Commit c4a515de authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[FIX #298] now WOSG is removed, every BIND_PER_PRIMITIVE is removed.

parent 6bf871bf
......@@ -35,9 +35,6 @@
#include <osg/Node>
#include <osg/TexEnv>
// Compatibility between OSG 3.2 and earlier versions
#include "core/graphicsEngine/WOSG.h"
#include "../common/WPathHelper.h"
#include "WGETextureHud.h"
......@@ -190,7 +187,7 @@ WGETextureHud::WGETextureHudEntry::WGETextureHudEntry( osg::ref_ptr< osg::Textur
osg::Geode* geode = new osg::Geode();
// Set up geometry for the HUD and add it to the HUD
osg::ref_ptr< wosg::Geometry > HUDBackgroundGeometry = new wosg::Geometry();
osg::ref_ptr< osg::Geometry > HUDBackgroundGeometry = new osg::Geometry();
osg::ref_ptr< osg::Vec3Array > HUDBackgroundVertices = new osg::Vec3Array;
HUDBackgroundVertices->push_back( osg::Vec3( 0, 0, -1 ) );
......@@ -216,11 +213,11 @@ WGETextureHud::WGETextureHudEntry::WGETextureHudEntry( osg::ref_ptr< osg::Textur
osg::ref_ptr< osg::Vec3Array > HUDnormals = new osg::Vec3Array;
HUDnormals->push_back( osg::Vec3( 0.0f, 0.0f, 1.0f ) );
HUDBackgroundGeometry->setNormalArray( HUDnormals );
HUDBackgroundGeometry->setNormalBinding( wosg::Geometry::BIND_OVERALL );
HUDBackgroundGeometry->setNormalBinding( osg::Geometry::BIND_OVERALL );
HUDBackgroundGeometry->addPrimitiveSet( HUDBackgroundIndices );
HUDBackgroundGeometry->setVertexArray( HUDBackgroundVertices );
HUDBackgroundGeometry->setColorArray( HUDcolors );
HUDBackgroundGeometry->setColorBinding( wosg::Geometry::BIND_OVERALL );
HUDBackgroundGeometry->setColorBinding( osg::Geometry::BIND_OVERALL );
HUDBackgroundGeometry->setTexCoordArray( 0, HUDBackgroundTex );
geode->addDrawable( HUDBackgroundGeometry );
......
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#ifndef WOSG_H
#define WOSG_H
#include "osg/Version"
// Since OSG 3.2, OpenSceneGraph has changed several things in their Geometry class. For compilation compatibility, they provide
// deprecated_osg::Geometry. It was introduced somewhere in between 3.0 and 3.2. As I do not know where exactly, we only differentiate between
// 3.2 and earlier.
#if OSG_VERSION_GREATER_OR_EQUAL( 3, 2, 0 )
#define wosg deprecated_osg
#else
#define wosg osg
#endif
#endif // WOSG_H
......@@ -28,7 +28,7 @@
#include "WROI.h"
#include "WPickHandler.h"
WROI::WROI() :
WROI::WROI():
osg::Geode()
{
properties();
......
......@@ -36,9 +36,6 @@
#include "callbacks/WGEFunctorCallback.h"
#include "WGraphicsEngine.h"
// Compatibility between OSG 3.2 and earlier versions
#include "core/graphicsEngine/WOSG.h"
#include "WROIArbitrary.h"
WROIArbitrary::WROIArbitrary( size_t nbCoordsX, size_t nbCoordsY, size_t nbCoordsZ,
......@@ -158,24 +155,22 @@ void WROIArbitrary::updateGFX()
&m_vals,
m_threshold->get() );
wosg::Geometry* surfaceGeometry = new wosg::Geometry();
osg::Geometry* surfaceGeometry = new osg::Geometry();
setName( "roi" );
surfaceGeometry->setVertexArray( m_triMesh->getVertexArray() );
// ------------------------------------------------
// normals
// FIXME: OSG 3.2 no longer supports binding per primitive. I did not find any evidence that the marching lego Algorithm calculated any
// normals. So the code is disabled.
// surfaceGeometry->setNormalArray( m_triMesh->getTriangleNormalArray() );
// surfaceGeometry->setNormalBinding( wosg::Geometry::BIND_PER_PRIMITIVE );
surfaceGeometry->setNormalArray( m_triMesh->getVertexNormalArray() );
surfaceGeometry->setNormalBinding( osg::Geometry::BIND_PER_VERTEX );
// ------------------------------------------------
// colors
osg::Vec4Array* colors = new osg::Vec4Array;
colors->push_back( m_color );
surfaceGeometry->setColorArray( colors );
surfaceGeometry->setColorBinding( wosg::Geometry::BIND_OVERALL );
surfaceGeometry->setColorBinding( osg::Geometry::BIND_OVERALL );
osg::DrawElementsUInt* surfaceElement = new osg::DrawElementsUInt( osg::PrimitiveSet::TRIANGLES, 0 );
......
This diff is collapsed.
......@@ -32,9 +32,6 @@
#include <osg/Geometry>
// Compatibility between OSG 3.2 and earlier versions
#include "core/graphicsEngine/WOSG.h"
#include "WPickHandler.h"
#include "shaders/WGEShader.h"
......@@ -124,7 +121,7 @@ private:
WVector2d m_oldPixelPosition; //!< Caches the old picked position to a allow for cmoparison
int16_t m_oldScrollWheel; //!< caches scroll wheel value
boost::shared_mutex m_updateLock; //!< Lock to prevent concurrent threads trying to update the osg node
osg::ref_ptr< wosg::Geometry > m_surfaceGeometry; //!< store this pointer for use in updates
osg::ref_ptr< osg::Geometry > m_surfaceGeometry; //!< store this pointer for use in updates
WPickInfo m_pickInfo; //!< Stores the pick information for potential redraw
......@@ -174,6 +171,13 @@ private:
* \param property the property
*/
void boxPropertiesChanged( boost::shared_ptr< WPropertyBase > property );
/**
* Set new color of the box in the geometry
*
* \param color the new color
*/
void updateColor( osg::Vec4 color );
};
#endif // WROIBOX_H
......@@ -26,9 +26,6 @@
#include "../../graphicsEngine/WGEUtils.h"
// Compatibility between OSG 3.2 and earlier versions
#include "core/graphicsEngine/WOSG.h"
#include "WDendrogramGeode.h"
/**
......@@ -84,14 +81,14 @@ void WDendrogramGeode::create()
(*m_vertexArray)[i].y() = (*m_vertexArray)[i].y() * m_yMult + m_yOff;
}
osg::ref_ptr< wosg::Geometry > geometry = osg::ref_ptr< wosg::Geometry >( new wosg::Geometry() );
osg::ref_ptr< osg::Geometry > geometry = osg::ref_ptr< osg::Geometry >( new osg::Geometry() );
geometry->setVertexArray( m_vertexArray );
geometry->addPrimitiveSet( m_lineArray );
geometry->setColorArray( m_colors );
geometry->setColorBinding( wosg::Geometry::BIND_PER_VERTEX );
geometry->setColorBinding( osg::Geometry::BIND_PER_VERTEX );
osg::StateSet* state = geometry->getOrCreateStateSet();
state->setMode( GL_LIGHTING, osg::StateAttribute::OFF | osg::StateAttribute::PROTECTED );
......
......@@ -31,9 +31,6 @@
#include "../WGEGeodeUtils.h"
#include "WGEGridNode.h"
// Compatibility between OSG 3.2 and earlier versions
#include "core/graphicsEngine/WOSG.h"
WGEGridNode::WGEGridNode( WGridRegular3D::ConstSPtr grid ):
m_boundaryGeode( new osg::Geode() ),
m_innerGridGeode( new osg::Geode() ),
......@@ -254,7 +251,7 @@ void WGEGridNode::callback( osg::Node* /*node*/ )
// grab the grid
WGridRegular3D::ConstSPtr grid = m_grid.getReadTicket()->get();
wosg::Geometry* gridGeometry = new wosg::Geometry();
osg::Geometry* gridGeometry = new osg::Geometry();
osg::ref_ptr< osg::Vec3Array > vertArray = new osg::Vec3Array( grid->size() );
osg::DrawElementsUInt* gridElement = new osg::DrawElementsUInt( osg::PrimitiveSet::LINES, 0 );
......@@ -304,7 +301,7 @@ void WGEGridNode::callback( osg::Node* /*node*/ )
// finally, the colors
colors->push_back( m_gridColor );
gridGeometry->setColorArray( colors );
gridGeometry->setColorBinding( wosg::Geometry::BIND_OVERALL );
gridGeometry->setColorBinding( osg::Geometry::BIND_OVERALL );
if( m_innerGridGeode->getNumDrawables() )
{
......
......@@ -29,9 +29,6 @@
#include "../../WGraphicsEngine.h"
#include "../../WGECamera.h"
// Compatibility between OSG 3.2 and earlier versions
#include "core/graphicsEngine/WOSG.h"
#include "WGEBorderLayout.h"
WGEBorderLayout::WGEBorderLayout():
......@@ -124,14 +121,14 @@ void WGEBorderLayout::SafeUpdateCallback::operator()( osg::Node* node, osg::Node
}
// create geometry for the lines calculated above
osg::ref_ptr< wosg::Geometry > g = new wosg::Geometry;
osg::ref_ptr< osg::Geometry > g = new osg::Geometry;
g->setDataVariance( osg::Object::DYNAMIC );
osg::ref_ptr< osg::DrawArrays > da = new osg::DrawArrays( osg::PrimitiveSet::LINES, 0, v->size() );
g->setVertexArray( v );
osg::ref_ptr< osg::Vec4Array > colors = new osg::Vec4Array;
colors->push_back( osg::Vec4( 0.0f, 0.0f, 0.0f, 1.0f ) );
g->setColorArray( colors );
g->setColorBinding( wosg::Geometry::BIND_OVERALL );
g->setColorBinding( osg::Geometry::BIND_OVERALL );
g->addPrimitiveSet( da );
osg::LineWidth* linewidth = new osg::LineWidth();
......
......@@ -41,9 +41,6 @@
#include "core/kernel/WKernel.h"
#include "core/kernel/WSelectionManager.h"
// Compatibility between OSG 3.2 and earlier versions
#include "core/graphicsEngine/WOSG.h"
#include "WMArbitraryPlane.h"
#include "WMArbitraryPlane.xpm"
......@@ -285,7 +282,7 @@ void WMArbitraryPlane::updatePlane()
WPosition v2( p0[0] + p0[0] - p1[0] , p0[1] + p0[1] - p2[1] , p0[2] + ( p0[2] - p1[2] ) + ( p0[2] - p2[2] ) );
WPosition v3( p0[0] + p0[0] - p1[0] , p2[1] , p0[2] + ( p0[2] - p1[2] ) - ( p0[2] - p2[2] ) );
osg::ref_ptr<wosg::Geometry> planeGeometry = osg::ref_ptr<wosg::Geometry>( new wosg::Geometry() );
osg::ref_ptr<osg::Geometry> planeGeometry = osg::ref_ptr<osg::Geometry>( new osg::Geometry() );
osg::Vec3Array* planeVertices = new osg::Vec3Array;
planeVertices->push_back( v0 );
......
......@@ -42,9 +42,6 @@
#include "core/kernel/WROIManager.h"
#include "core/kernel/WSelectionManager.h"
// Compatibility between OSG 3.2 and earlier versions
#include "core/graphicsEngine/WOSG.h"
#include "WMArbitraryROIs.h"
#include "WMArbitraryROIs.xpm"
......@@ -313,7 +310,7 @@ void WMArbitraryROIs::renderMesh()
if( m_showSelector )
{
wosg::Geometry* surfaceGeometry = new wosg::Geometry();
osg::Geometry* surfaceGeometry = new osg::Geometry();
m_outputGeode = osg::ref_ptr< osg::Geode >( new osg::Geode );
m_outputGeode->setName( "ROI" );
......@@ -323,14 +320,14 @@ void WMArbitraryROIs::renderMesh()
// ------------------------------------------------
// normals
surfaceGeometry->setNormalArray( m_triMesh->getVertexNormalArray() );
surfaceGeometry->setNormalBinding( wosg::Geometry::BIND_PER_VERTEX );
surfaceGeometry->setNormalBinding( osg::Geometry::BIND_PER_VERTEX );
// ------------------------------------------------
// colors
osg::Vec4Array* colors = new osg::Vec4Array;
colors->push_back( osg::Vec4( 0.2f, 1.0f, 0.2f, 1.0f ) );
surfaceGeometry->setColorArray( colors );
surfaceGeometry->setColorBinding( wosg::Geometry::BIND_OVERALL );
surfaceGeometry->setColorBinding( osg::Geometry::BIND_OVERALL );
osg::DrawElementsUInt* surfaceElement = new osg::DrawElementsUInt( osg::PrimitiveSet::TRIANGLES, 0 );
......
......@@ -43,9 +43,6 @@
#include "core/kernel/WKernel.h"
#include "core/kernel/WSelectionManager.h"
// Compatibility between OSG 3.2 and earlier versions
#include "core/graphicsEngine/WOSG.h"
#include "WFileParser.h"
#include "WMClusterDisplayVoxels.h"
#include "WMClusterDisplayVoxels.xpm"
......@@ -767,7 +764,7 @@ void WMClusterDisplayVoxels::renderMesh()
{
for( size_t i = 0; i < m_triMeshes.size(); ++i )
{
wosg::Geometry* surfaceGeometry = new wosg::Geometry();
osg::Geometry* surfaceGeometry = new osg::Geometry();
osg::ref_ptr< osg::Geode >outputGeode = osg::ref_ptr< osg::Geode >( new osg::Geode );
outputGeode->setName( ( std::string( "cluster" ) + string_utils::toString( m_activatedClusters[i] ) ).c_str() );
......@@ -776,15 +773,15 @@ void WMClusterDisplayVoxels::renderMesh()
// ------------------------------------------------
// normals
surfaceGeometry->setNormalArray( m_triMeshes[i]->getTriangleNormalArray() );
surfaceGeometry->setNormalBinding( wosg::Geometry::BIND_PER_PRIMITIVE );
surfaceGeometry->setNormalArray( m_triMeshes[i]->getVertexNormalArray() );
surfaceGeometry->setNormalBinding( osg::Geometry::BIND_PER_VERTEX );
// ------------------------------------------------
// colors
osg::Vec4Array* colors = new osg::Vec4Array;
colors->push_back( m_clusterColors[m_activatedClusters[i]] );
surfaceGeometry->setColorArray( colors );
surfaceGeometry->setColorBinding( wosg::Geometry::BIND_OVERALL );
surfaceGeometry->setColorBinding( osg::Geometry::BIND_OVERALL );
osg::DrawElementsUInt* surfaceElement = new osg::DrawElementsUInt( osg::PrimitiveSet::TRIANGLES, 0 );
......@@ -810,7 +807,7 @@ void WMClusterDisplayVoxels::renderMesh()
}
if( m_propShowVoxelTriangulation->get( true ) && m_showNotInClusters->get() )
{
wosg::Geometry* surfaceGeometry = new wosg::Geometry();
osg::Geometry* surfaceGeometry = new osg::Geometry();
osg::ref_ptr< osg::Geode >outputGeode = osg::ref_ptr< osg::Geode >( new osg::Geode );
outputGeode->setName( ( std::string( "non active" ) ).c_str() );
......@@ -819,8 +816,8 @@ void WMClusterDisplayVoxels::renderMesh()
// ------------------------------------------------
// normals
surfaceGeometry->setNormalArray( m_nonActiveMesh->getTriangleNormalArray() );
surfaceGeometry->setNormalBinding( wosg::Geometry::BIND_PER_PRIMITIVE );
surfaceGeometry->setNormalArray( m_nonActiveMesh->getVertexNormalArray() );
surfaceGeometry->setNormalBinding( osg::Geometry::BIND_PER_VERTEX );
// ------------------------------------------------
// colors
......@@ -828,7 +825,7 @@ void WMClusterDisplayVoxels::renderMesh()
colors->push_back( osg::Vec4( 0.3, 0.3, 0.3, 1.0f ) );
surfaceGeometry->setColorArray( colors );
surfaceGeometry->setColorBinding( wosg::Geometry::BIND_OVERALL );
surfaceGeometry->setColorBinding( osg::Geometry::BIND_OVERALL );
osg::DrawElementsUInt* surfaceElement = new osg::DrawElementsUInt( osg::PrimitiveSet::TRIANGLES, 0 );
......
......@@ -37,9 +37,6 @@
#include "core/graphicsEngine/widgets/labeling/WGELabel.h"
#include "core/kernel/WKernel.h"
// Compatibility between OSG 3.2 and earlier versions
#include "core/graphicsEngine/WOSG.h"
#include "WMColormapper.xpm"
#include "WMColormapper.h"
......@@ -478,12 +475,12 @@ void WMColormapper::updateColorbarScale( osg::Node* scaleLabels )
}
// create the line drawable
wosg::Geometry* lines = new wosg::Geometry();
osg::Geometry* lines = new osg::Geometry();
lines->setVertexArray( lineVerts );
osg::Vec4Array* color = new osg::Vec4Array();
color->push_back( m_colorBarLabelsBarColor->get() );
lines->setColorArray( color );
lines->setColorBinding( wosg::Geometry::BIND_OVERALL );
lines->setColorBinding( osg::Geometry::BIND_OVERALL );
lines->addPrimitiveSet( new osg::DrawArrays( GL_LINES, 0, lineVerts->size() ) );
g->addDrawable( lines );
}
......
......@@ -40,9 +40,6 @@
#include "core/kernel/WKernel.h"
#include "core/kernel/WSelectionManager.h"
// Compatibility between OSG 3.2 and earlier versions
#include "core/graphicsEngine/WOSG.h"
#include "WMCoordinateSystem.h"
#include "WMCoordinateSystem.xpm"
#include "WTalairachConverter.h"
......@@ -576,7 +573,7 @@ void WMCoordinateSystem::addSagittalGrid( float position )
}
osg::ref_ptr< osg::Geode > gridGeode = osg::ref_ptr< osg::Geode >( new osg::Geode() );
osg::ref_ptr< wosg::Geometry > geometry = osg::ref_ptr< wosg::Geometry >( new wosg::Geometry() );
osg::ref_ptr< osg::Geometry > geometry = osg::ref_ptr< osg::Geometry >( new osg::Geometry() );
osg::Vec3Array* vertices = new osg::Vec3Array;
WBoundingBox boundingBox = m_coordConverter->getBoundingBox();
......@@ -657,7 +654,7 @@ void WMCoordinateSystem::addCoronalGrid( float position )
}
osg::ref_ptr< osg::Geode > gridGeode = osg::ref_ptr< osg::Geode >( new osg::Geode() );
osg::ref_ptr< wosg::Geometry > geometry = osg::ref_ptr< wosg::Geometry >( new wosg::Geometry() );
osg::ref_ptr< osg::Geometry > geometry = osg::ref_ptr< osg::Geometry >( new osg::Geometry() );
osg::Vec3Array* vertices = new osg::Vec3Array;
WBoundingBox boundingBox = m_coordConverter->getBoundingBox();
......@@ -738,7 +735,7 @@ void WMCoordinateSystem::addAxialGrid( float position )
}
osg::ref_ptr< osg::Geode > gridGeode = osg::ref_ptr< osg::Geode >( new osg::Geode() );
osg::ref_ptr< wosg::Geometry > geometry = osg::ref_ptr< wosg::Geometry >( new wosg::Geometry() );
osg::ref_ptr< osg::Geometry > geometry = osg::ref_ptr< osg::Geometry >( new osg::Geometry() );
osg::Vec3Array* vertices = new osg::Vec3Array;
WBoundingBox boundingBox = m_coordConverter->getBoundingBox();
......
......@@ -34,9 +34,6 @@
#include "core/common/WStringUtils.h"
#include "core/common/WPathHelper.h"
// Compatibility between OSG 3.2 and earlier versions
#include "core/graphicsEngine/WOSG.h"
#include "WRulerOrtho.h"
WRulerOrtho::WRulerOrtho( boost::shared_ptr<WCoordConverter>coordConverter, osg::Vec3 origin, scaleMode mode, bool showNumbers ) :
......@@ -59,7 +56,7 @@ WRulerOrtho::~WRulerOrtho()
void WRulerOrtho::create()
{
osg::ref_ptr< osg::Geode > rulerGeode = osg::ref_ptr< osg::Geode >( new osg::Geode() );
osg::ref_ptr< wosg::Geometry > geometry;
osg::ref_ptr< osg::Geometry > geometry;
switch( m_scaleMode )
{
......@@ -127,9 +124,9 @@ void WRulerOrtho::addLabel( osg::Vec3 position, std::string text )
labelXform->addChild( labelGeode );
}
osg::ref_ptr< wosg::Geometry > WRulerOrtho::createXY()
osg::ref_ptr< osg::Geometry > WRulerOrtho::createXY()
{
osg::ref_ptr< wosg::Geometry > geometry = osg::ref_ptr< wosg::Geometry >( new wosg::Geometry() );
osg::ref_ptr< osg::Geometry > geometry = osg::ref_ptr< osg::Geometry >( new osg::Geometry() );
osg::Vec3Array* vertices = new osg::Vec3Array;
int startX = static_cast< int > ( m_lb[0] + 0.5 );
......@@ -201,9 +198,9 @@ osg::ref_ptr< wosg::Geometry > WRulerOrtho::createXY()
return geometry;
}
osg::ref_ptr< wosg::Geometry > WRulerOrtho::createXZ()
osg::ref_ptr< osg::Geometry > WRulerOrtho::createXZ()
{
osg::ref_ptr< wosg::Geometry > geometry = osg::ref_ptr< wosg::Geometry >( new wosg::Geometry() );
osg::ref_ptr< osg::Geometry > geometry = osg::ref_ptr< osg::Geometry >( new osg::Geometry() );
osg::Vec3Array* vertices = new osg::Vec3Array;
int startX = static_cast< int > ( m_lb[0] + 0.5 );
......@@ -274,9 +271,9 @@ osg::ref_ptr< wosg::Geometry > WRulerOrtho::createXZ()
return geometry;
}
osg::ref_ptr< wosg::Geometry > WRulerOrtho::createYX()
osg::ref_ptr< osg::Geometry > WRulerOrtho::createYX()
{
osg::ref_ptr< wosg::Geometry > geometry = osg::ref_ptr< wosg::Geometry >( new wosg::Geometry() );
osg::ref_ptr< osg::Geometry > geometry = osg::ref_ptr< osg::Geometry >( new osg::Geometry() );
osg::Vec3Array* vertices = new osg::Vec3Array;
int startY = static_cast< int > ( m_lb[1] + 0.5 );
......@@ -349,9 +346,9 @@ osg::ref_ptr< wosg::Geometry > WRulerOrtho::createYX()
return geometry;
}
osg::ref_ptr< wosg::Geometry > WRulerOrtho::createYZ()
osg::ref_ptr< osg::Geometry > WRulerOrtho::createYZ()
{
osg::ref_ptr< wosg::Geometry > geometry = osg::ref_ptr< wosg::Geometry >( new wosg::Geometry() );
osg::ref_ptr< osg::Geometry > geometry = osg::ref_ptr< osg::Geometry >( new osg::Geometry() );
osg::Vec3Array* vertices = new osg::Vec3Array;
int startY = static_cast< int > ( m_lb[1] + 0.5 );
......@@ -424,9 +421,9 @@ osg::ref_ptr< wosg::Geometry > WRulerOrtho::createYZ()
return geometry;
}
osg::ref_ptr< wosg::Geometry > WRulerOrtho::createZX()
osg::ref_ptr< osg::Geometry > WRulerOrtho::createZX()
{
osg::ref_ptr< wosg::Geometry > geometry = osg::ref_ptr< wosg::Geometry >( new wosg::Geometry() );
osg::ref_ptr< osg::Geometry > geometry = osg::ref_ptr< osg::Geometry >( new osg::Geometry() );
osg::Vec3Array* vertices = new osg::Vec3Array;
int startZ = static_cast< int > ( m_lb[2] + 0.5 );
......@@ -499,9 +496,9 @@ osg::ref_ptr< wosg::Geometry > WRulerOrtho::createZX()
return geometry;
}
osg::ref_ptr< wosg::Geometry > WRulerOrtho::createZY()
osg::ref_ptr< osg::Geometry > WRulerOrtho::createZY()
{
osg::ref_ptr< wosg::Geometry > geometry = osg::ref_ptr< wosg::Geometry >( new wosg::Geometry() );
osg::ref_ptr< osg::Geometry > geometry = osg::ref_ptr< osg::Geometry >( new osg::Geometry() );
osg::Vec3Array* vertices = new osg::Vec3Array;
int startZ = static_cast< int > ( m_lb[2] + 0.5 );
......
......@@ -31,9 +31,6 @@
#include "core/common/math/linearAlgebra/WVectorFixed.h"
// Compatibility between OSG 3.2 and earlier versions
#include "core/graphicsEngine/WOSG.h"
#include "WCoordConverter.h"
#include "WRuler.h"
......@@ -107,42 +104,42 @@ private:
*
* \return A part of the geometry of the ruler
*/
osg::ref_ptr< wosg::Geometry > createXY();
osg::ref_ptr< osg::Geometry > createXY();
/**
* Helper function to create the ruler along the x axis
*
* \return A part of the geometry of the ruler
*/
osg::ref_ptr< wosg::Geometry > createXZ();
osg::ref_ptr< osg::Geometry > createXZ();
/**
* Helper function to create the ruler along the y axis
*
* \return A part of the geometry of the ruler
*/
osg::ref_ptr< wosg::Geometry > createYX();
osg::ref_ptr< osg::Geometry > createYX();
/**
* Helper function to create the ruler along the y axis
*
* \return A part of the geometry of the ruler
*/
osg::ref_ptr< wosg::Geometry > createYZ();
osg::ref_ptr< osg::Geometry > createYZ();
/**
* Helper function to create the ruler along the z axis
*
* \return A part of the geometry of the ruler
*/
osg::ref_ptr< wosg::Geometry > createZX();
osg::ref_ptr< osg::Geometry > createZX();
/**
* Helper function to create the ruler along the z axis
*
* \return A part of the geometry of the ruler
*/
osg::ref_ptr< wosg::Geometry > createZY();
osg::ref_ptr< osg::Geometry > createZY();
/**
* converts a number into a string according to the currently selected coordinate system
......
......@@ -36,9 +36,6 @@
#include "core/kernel/WKernel.h"
#include "core/kernel/WSelectionManager.h"
// Compatibility between OSG 3.2 and earlier versions
#include "core/graphicsEngine/WOSG.h"
#include "WMDatasetProfile.h"
#include "WMDatasetProfile.xpm" // Please put a real icon here.
......@@ -339,7 +336,7 @@ void WMDatasetProfile::update()
{
osg::ref_ptr< osg::Vec3Array > vertices = osg::ref_ptr< osg::Vec3Array >( new osg::Vec3Array );
osg::ref_ptr< osg::Vec4Array > colors = osg::ref_ptr< osg::Vec4Array >( new osg::Vec4Array );
osg::ref_ptr< wosg::Geometry > geometry = osg::ref_ptr< wosg::Geometry >( new wosg::Geometry );
osg::ref_ptr< osg::Geometry > geometry = osg::ref_ptr< osg::Geometry >( new osg::Geometry );
for( size_t i = 0; i < knobs.size(); ++i )
{
......@@ -351,7 +348,7 @@ void WMDatasetProfile::update()
colors->push_back( m_graphColor->get() );
geometry->setColorArray( colors );
geometry->setColorBinding( wosg::Geometry::BIND_OVERALL );
geometry->setColorBinding( osg::Geometry::BIND_OVERALL );
// disable light for this geode as lines can't be lit properly
osg::StateSet* state = m_lineGeode->getOrCreateStateSet();
......@@ -402,7 +399,7 @@ osg::ref_ptr< osg::Geode > WMDatasetProfile::createGraphGridGeode()
osg::ref_ptr< osg::Vec3Array > vertices = osg::ref_ptr< osg::Vec3Array >( new osg::Vec3Array );
osg::ref_ptr< osg::Vec4Array > colors = osg::ref_ptr< osg::Vec4Array >( new osg::Vec4Array );
osg::ref_ptr< wosg::Geometry > geometry = osg::ref_ptr< wosg::Geometry >( new wosg::Geometry );
osg::ref_ptr< osg::Geometry > geometry = osg::ref_ptr< osg::Geometry >( new osg::Geometry );
int step = ( m_oldViewWidth - 20 ) / 10;