Commit 4124ee9a authored by Alexander Wiebel's avatar Alexander Wiebel

[CLEAN #395] we finally have only one triangle mesh with only one name

parent 67c64abf
......@@ -189,7 +189,7 @@ osg::ref_ptr< osg::Node > wge::generateSolidBoundingBoxNode( const wmath::WPosit
return transform;
}
osg::ref_ptr< osg::Geometry > wge::convertToOsgGeometry( WTriangleMesh2* mesh, bool includeNormals )
osg::ref_ptr< osg::Geometry > wge::convertToOsgGeometry( WTriangleMesh* mesh, bool includeNormals )
{
osg::ref_ptr< osg::Vec3Array > vertices = mesh->getVertexArray();
......
......@@ -42,7 +42,7 @@
#include "../common/math/WPosition.h"
#include "WGEGeometryUtils.h"
#include "WGEUtils.h"
#include "WTriangleMesh2.h"
#include "WTriangleMesh.h"
#include "WExportWGE.h"
......@@ -95,7 +95,7 @@ namespace wge
* them into the geometry.
* \return an osg::Geometry containing the mesh
*/
osg::ref_ptr< osg::Geometry > WGE_EXPORT convertToOsgGeometry( WTriangleMesh2* mesh, bool includeNormals = false );
osg::ref_ptr< osg::Geometry > WGE_EXPORT convertToOsgGeometry( WTriangleMesh* mesh, bool includeNormals = false );
/**
* Generates a line geode with thickness and color as parameters.
......
......@@ -32,7 +32,7 @@
#include "../common/math/WPosition.h"
#include "WGEGeometryUtils.h"
#include "WGEUtils.h"
#include "WTriangleMesh2.h"
#include "WTriangleMesh.h"
#include "exceptions/WGEException.h"
osg::ref_ptr< osg::Vec3Array > wge::generateCuboidQuads( const std::vector< wmath::WPosition >& corners )
......@@ -96,7 +96,7 @@ osg::ref_ptr< osg::Vec3Array > wge::generateCuboidQuadNormals( const std::vector
return vertices;
}
WTriangleMesh2 wge::triangulate( const std::vector< wmath::WPosition >& points, double transformationFactor )
WTriangleMesh wge::triangulate( const std::vector< wmath::WPosition >& points, double transformationFactor )
{
WAssert( points.size() > 2, "The Delaunay triangulation needs at least 3 vertices!" );
......@@ -151,7 +151,7 @@ WTriangleMesh2 wge::triangulate( const std::vector< wmath::WPosition >& points,
}
// I needed this reconversion using osgVec3Array because the triangulator changed my positions somehow.
WTriangleMesh2 mesh( wge::osgVec3Array( points ), triangles );
WTriangleMesh mesh( wge::osgVec3Array( points ), triangles );
return mesh;
}
......@@ -30,7 +30,7 @@
#include <osg/Array>
#include "../common/math/WPosition.h"
#include "WTriangleMesh2.h"
#include "WTriangleMesh.h"
#include "WExportWGE.h"
......@@ -124,7 +124,7 @@ namespace wge
* triangulation
* \return triangulation as WTriangleMesh
*/
WTriangleMesh2 WGE_EXPORT triangulate( const std::vector< wmath::WPosition >& points, double transformationFactor = 0.0 );
WTriangleMesh WGE_EXPORT triangulate( const std::vector< wmath::WPosition >& points, double transformationFactor = 0.0 );
}
#endif // WGEGEOMETRYUTILS_H
......@@ -41,7 +41,7 @@
WROIArbitrary::WROIArbitrary( size_t nbCoordsX, size_t nbCoordsY, size_t nbCoordsZ,
const wmath::WMatrix< double >& mat,
const std::vector< float >& vals,
boost::shared_ptr< WTriangleMesh2 > triMesh,
boost::shared_ptr< WTriangleMesh > triMesh,
float threshold,
float maxThreshold,
WColor color ) :
......
......@@ -37,7 +37,7 @@
#include "WPickHandler.h"
#include "WGEViewer.h"
#include "WTriangleMesh2.h"
#include "WTriangleMesh.h"
#include "WROI.h"
#include "WExportWGE.h"
......@@ -65,7 +65,7 @@ public:
WROIArbitrary( size_t nbCoordsX, size_t nbCoordsY, size_t nbCoordsZ,
const wmath::WMatrix< double >& mat,
const std::vector< float >& vals,
boost::shared_ptr< WTriangleMesh2 > triMesh,
boost::shared_ptr< WTriangleMesh > triMesh,
float threshold,
float maxThreshold,
WColor color );
......@@ -147,7 +147,7 @@ private:
const std::vector< float > m_vals; //!< The data at the vertices.
boost::shared_ptr< WTriangleMesh2 > m_triMesh; //!< This triangle mesh is provided as output through the connector.
boost::shared_ptr< WTriangleMesh > m_triMesh; //!< This triangle mesh is provided as output through the connector.
WPropDouble m_threshold; //!< the threshold
......
......@@ -22,8 +22,8 @@
//
//---------------------------------------------------------------------------
#ifndef WTRIANGLEMESH2_H
#define WTRIANGLEMESH2_H
#ifndef WTRIANGLEMESH_H
#define WTRIANGLEMESH_H
#include <list>
#include <string>
......@@ -40,7 +40,7 @@
/**
* Triangle mesh data structure allowing for convenient access of the elements.
*/
class WGE_EXPORT WTriangleMesh2 : public WTransferable
class WGE_EXPORT WTriangleMesh : public WTransferable
{
friend class WTriangleMeshTest;
public:
......@@ -50,7 +50,7 @@ public:
* \param vertNum
* \param triangleNum
*/
WTriangleMesh2( size_t vertNum, size_t triangleNum );
WTriangleMesh( size_t vertNum, size_t triangleNum );
/**
* Constructs a new mesh out of the given vertices and triangles.
......@@ -58,12 +58,12 @@ public:
* \param vertices Vec3Array storing all vertices
* \param triangles Vector of consecutive vertex indices where each 3 IDs are a triangle starting at 0,1,2 for first triangle 3,4,5 for the second
*/
WTriangleMesh2( osg::ref_ptr< osg::Vec3Array > vertices, const std::vector< size_t >& triangles );
WTriangleMesh( osg::ref_ptr< osg::Vec3Array > vertices, const std::vector< size_t >& triangles );
/**
* destructor
*/
virtual ~WTriangleMesh2();
virtual ~WTriangleMesh();
/**
* Returns a prototype instantiated with the true type of the deriving class.
......@@ -350,7 +350,7 @@ public:
* \param yOff
* \param zOff
*/
void addMesh( boost::shared_ptr<WTriangleMesh2> mesh, float xOff = 0., float yOff = 0., float zOff = 0. );
void addMesh( boost::shared_ptr<WTriangleMesh> mesh, float xOff = 0., float yOff = 0., float zOff = 0. );
/**
* moves the entire mesh to a new postion
......@@ -378,7 +378,7 @@ public:
*
* \return True if and only if both: vertices and triangles are exactly the same.
*/
bool operator==( const WTriangleMesh2& rhs ) const;
bool operator==( const WTriangleMesh& rhs ) const;
protected:
static boost::shared_ptr< WPrototyped > m_prototype; //!< The prototype as singleton.
......@@ -386,7 +386,7 @@ private:
/**
* we don't allow the standard constructor
*/
WTriangleMesh2();
WTriangleMesh();
/**
* removes a vertex from the vertex array, if any triangles still index that vertex they will be
......@@ -604,7 +604,7 @@ namespace tm_utils
*
* \return List of components where each of them is a WTriangleMesh again.
*/
WGE_EXPORT boost::shared_ptr< std::list< boost::shared_ptr< WTriangleMesh2 > > > componentDecomposition( const WTriangleMesh2& mesh );
WGE_EXPORT boost::shared_ptr< std::list< boost::shared_ptr< WTriangleMesh > > > componentDecomposition( const WTriangleMesh& mesh );
/**
* Prints for each mesh \#vertices and \#triangles, as well as each triangle with its positions. No point IDs are printed.
......@@ -614,26 +614,26 @@ namespace tm_utils
*
* \return The output stream again for further usage.
*/
WGE_EXPORT std::ostream& operator<<( std::ostream& os, const WTriangleMesh2& rhs );
WGE_EXPORT std::ostream& operator<<( std::ostream& os, const WTriangleMesh& rhs );
}
inline bool WTriangleMesh2::operator==( const WTriangleMesh2& rhs ) const
inline bool WTriangleMesh::operator==( const WTriangleMesh& rhs ) const
{
return std::equal( m_verts->begin(), m_verts->end(), rhs.m_verts->begin() ) &&
std::equal( m_triangles.begin(), m_triangles.end(), rhs.m_triangles.begin() );
}
inline void WTriangleMesh2::addTextureCoordinate( osg::Vec3 texCoord )
inline void WTriangleMesh::addTextureCoordinate( osg::Vec3 texCoord )
{
( *m_textureCoordinates )[m_countVerts-1] = texCoord;
}
inline void WTriangleMesh2::addTextureCoordinate( float x, float y, float z )
inline void WTriangleMesh::addTextureCoordinate( float x, float y, float z )
{
addTextureCoordinate( osg::Vec3( x, y, z ) );
}
inline void WTriangleMesh2::addVertex( osg::Vec3 vert )
inline void WTriangleMesh::addVertex( osg::Vec3 vert )
{
if ( ( *m_verts ).size() == m_countVerts )
{
......@@ -648,64 +648,64 @@ inline void WTriangleMesh2::addVertex( osg::Vec3 vert )
++m_countVerts;
}
inline const std::string WTriangleMesh2::getName() const
inline const std::string WTriangleMesh::getName() const
{
return "WTriangleMesh";
}
inline const std::string WTriangleMesh2::getDescription() const
inline const std::string WTriangleMesh::getDescription() const
{
return "Triangle mesh data structure allowing for convenient access of the elements.";
}
inline void WTriangleMesh2::setTriVert0( size_t triId, size_t vertId )
inline void WTriangleMesh::setTriVert0( size_t triId, size_t vertId )
{
WAssert( triId < m_countTriangles, "set tri vert 0: triangle id out of range" );
WAssert( vertId < m_countVerts, "vertex id out of range" );
m_triangles[ triId * 3 ] = vertId;
}
inline void WTriangleMesh2::setTriVert1( size_t triId, size_t vertId )
inline void WTriangleMesh::setTriVert1( size_t triId, size_t vertId )
{
WAssert( triId < m_countTriangles, "set tri vert 1: triangle id out of range" );
WAssert( vertId < m_countVerts, "vertex id out of range" );
m_triangles[ triId * 3 + 1] = vertId;
}
inline void WTriangleMesh2::setTriVert2( size_t triId, size_t vertId )
inline void WTriangleMesh::setTriVert2( size_t triId, size_t vertId )
{
WAssert( triId < m_countTriangles, "set tri vert 2: triangle id out of range" );
WAssert( vertId < m_countVerts, "vertex id out of range" );
m_triangles[ triId * 3 + 2] = vertId;
}
inline osg::Vec3 WTriangleMesh2::getTriVert( size_t triId, size_t vertNum )
inline osg::Vec3 WTriangleMesh::getTriVert( size_t triId, size_t vertNum )
{
WAssert( triId < m_countTriangles, "triangle id out of range" );
return ( *m_verts )[ m_triangles[ triId * 3 + vertNum] ];
}
inline size_t WTriangleMesh2::getTriVertId0( size_t triId ) const
inline size_t WTriangleMesh::getTriVertId0( size_t triId ) const
{
WAssert( triId < m_countTriangles, "get tri vert id 0: triangle id out of range" );
return m_triangles[triId * 3];
}
inline size_t WTriangleMesh2::getTriVertId1( size_t triId ) const
inline size_t WTriangleMesh::getTriVertId1( size_t triId ) const
{
WAssert( triId < m_countTriangles, "get tri vert id 1: triangle id out of range" );
return m_triangles[triId * 3 + 1];
}
inline size_t WTriangleMesh2::getTriVertId2( size_t triId ) const
inline size_t WTriangleMesh::getTriVertId2( size_t triId ) const
{
WAssert( triId < m_countTriangles, "get tri vert id 2: triangle id out of range" );
return m_triangles[triId * 3 + 2];
}
inline void WTriangleMesh2::setVertex( size_t index, osg::Vec3 vert )
inline void WTriangleMesh::setVertex( size_t index, osg::Vec3 vert )
{
( *m_verts )[index] = vert;
}
#endif // WTRIANGLEMESH2_H
#endif // WTRIANGLEMESH_H
......@@ -29,7 +29,7 @@
#include <map>
#include "../../common/math/WMatrix.h"
#include "../../common/WProgressCombiner.h"
#include "../WTriangleMesh2.h"
#include "../WTriangleMesh.h"
#include "marchingCubesCaseTables.h"
#include "../WExportWGE.h"
......@@ -108,7 +108,7 @@ public:
* \param mainProgress progress combiner used to report our progress to
*/
template< typename T >
boost::shared_ptr< WTriangleMesh2 > generateSurface( size_t nbCoordsX, size_t nbCoordsY, size_t nbCoordsZ,
boost::shared_ptr< WTriangleMesh > generateSurface( size_t nbCoordsX, size_t nbCoordsY, size_t nbCoordsZ,
const wmath::WMatrix< double >& mat,
const std::vector< T >* vals,
double isoValue,
......@@ -173,7 +173,7 @@ private:
};
template<typename T> boost::shared_ptr<WTriangleMesh2> WMarchingCubesAlgorithm::generateSurface( size_t nbCoordsX, size_t nbCoordsY, size_t nbCoordsZ,
template<typename T> boost::shared_ptr<WTriangleMesh> WMarchingCubesAlgorithm::generateSurface( size_t nbCoordsX, size_t nbCoordsY, size_t nbCoordsZ,
const wmath::WMatrix< double >& mat,
const std::vector< T >* vals,
double isoValue,
......@@ -336,7 +336,7 @@ template<typename T> boost::shared_ptr<WTriangleMesh2> WMarchingCubesAlgorithm::
}
unsigned int nextID = 0;
boost::shared_ptr< WTriangleMesh2 > triMesh( new WTriangleMesh2( m_idToVertices.size(), m_trivecTriangles.size() ) );
boost::shared_ptr< WTriangleMesh > triMesh( new WTriangleMesh( m_idToVertices.size(), m_trivecTriangles.size() ) );
// Rename vertices.
ID2WPointXYZId::iterator mapIterator = m_idToVertices.begin();
......
......@@ -49,7 +49,7 @@ public:
points[2] = wmath::WPosition( 1.0, 1.0, 0.0 );
points[3] = wmath::WPosition( 2.0, 1.0, 0.0 );
WTriangleMesh2 mesh = wge::triangulate( points );
WTriangleMesh mesh = wge::triangulate( points );
// test number of generated triangles
TS_ASSERT_EQUALS( mesh.triangleSize(), 2 );
......
......@@ -31,7 +31,7 @@
#include <cxxtest/ValueTraits.h>
#include "../../common/test/WTraitsBase.h"
#include "../WTriangleMesh2.h"
#include "../WTriangleMesh.h"
#ifdef CXXTEST_RUNNING
namespace CxxTest
......@@ -41,13 +41,13 @@ CXXTEST_TEMPLATE_INSTANTIATION
* Enables better UnitTest OutPut if something fails with WTriangleMeshs, so you see
* immedeatly what is failing.
*/
class ValueTraits< WTriangleMesh2 > : public WTraitsBase
class ValueTraits< WTriangleMesh > : public WTraitsBase
{
public:
/**
* Constructs a new ValueTrait of a WTriangleMesh2 for better test output
* Constructs a new ValueTrait of a WTriangleMesh for better test output
*/
explicit ValueTraits( const WTriangleMesh2 &mesh )
explicit ValueTraits( const WTriangleMesh &mesh )
{
std::stringstream ss;
using tm_utils::operator<<;
......
......@@ -22,8 +22,8 @@
//
//---------------------------------------------------------------------------
#ifndef WTRIANGLEMESH2_TEST_H
#define WTRIANGLEMESH2_TEST_H
#ifndef WTRIANGLEMESH_TEST_H
#define WTRIANGLEMESH_TEST_H
#include <algorithm>
#include <list>
......@@ -32,7 +32,7 @@
#include <cxxtest/TestSuite.h>
#include "../../common/math/WVector3D.h"
#include "../WTriangleMesh2.h"
#include "../WTriangleMesh.h"
#include "WTriangleMeshTraits.h"
/**
......@@ -47,8 +47,8 @@ public:
// */
// void testInstatiation()
// {
// TS_ASSERT_THROWS_NOTHING( WTriangleMesh2() );
// WTriangleMesh2 mesh;
// TS_ASSERT_THROWS_NOTHING( WTriangleMesh() );
// WTriangleMesh mesh;
// TS_ASSERT_EQUALS( mesh.m_fastAddVertId, 0 );
// TS_ASSERT_EQUALS( mesh.m_fastAddTriangleId, 0 );
// }
......@@ -58,7 +58,7 @@ public:
// */
// void testClearMesh()
// {
// WTriangleMesh2 mesh;
// WTriangleMesh mesh;
// mesh.m_fastAddVertId = 9; // just a number
// mesh.m_fastAddTriangleId = 10; // just a number
// mesh.m_vertices.resize( 11 ); // just some size
......@@ -77,7 +77,7 @@ public:
// */
// void testFastAddVert()
// {
// WTriangleMesh2 mesh;
// WTriangleMesh mesh;
// mesh.resizeVertices( 2 );
// wmath::WPosition newVert;
//
......@@ -93,7 +93,7 @@ public:
// */
// void testFastAddTriangle()
// {
// WTriangleMesh2 mesh;
// WTriangleMesh mesh;
// mesh.resizeTriangles( 2 );
//
// TS_ASSERT_EQUALS( mesh.m_fastAddTriangleId, 0 );
......@@ -108,7 +108,7 @@ public:
// */
// void testSetVertices()
// {
// WTriangleMesh2 mesh;
// WTriangleMesh mesh;
// std::vector< wmath::WPosition > vertices( 4 );
//
// TS_ASSERT_EQUALS( mesh.m_fastAddVertId, 0 );
......@@ -123,7 +123,7 @@ public:
// */
// void testSetTriangles()
// {
// WTriangleMesh2 mesh;
// WTriangleMesh mesh;
// std::vector< Triangle > triangles( 5 );
//
// TS_ASSERT_EQUALS( mesh.m_fastAddTriangleId, 0 );
......@@ -138,7 +138,7 @@ public:
// */
// void testgetTriangleNormal()
// {
// WTriangleMesh2 mesh;
// WTriangleMesh mesh;
//
// mesh.resizeVertices( 5 );
// wmath::WPosition newVert0( 0, 0, 0 );
......@@ -173,7 +173,7 @@ public:
// */
// void testComputeTriNormals()
// {
// WTriangleMesh2 mesh;
// WTriangleMesh mesh;
//
// mesh.resizeVertices( 5 );
// wmath::WPosition newVert0( 0, 0, 0 );
......@@ -220,7 +220,7 @@ public:
// */
// void testComputeVertNormals()
// {
// WTriangleMesh2 mesh;
// WTriangleMesh mesh;
//
// mesh.resizeVertices( 5 );
// wmath::WPosition newVert0( 0, 0, 0 );
......@@ -298,13 +298,13 @@ public:
*/
void testEqualityOperator( void )
{
WTriangleMesh2 mesh( 3, 1 );
WTriangleMesh mesh( 3, 1 );
mesh.addVertex( wmath::WPosition( 1, 0, 0 ) );
mesh.addVertex( wmath::WPosition( 0, 1, 0 ) );
mesh.addVertex( wmath::WPosition( 1, 0, 0 ) );
mesh.addTriangle( 0, 1, 2 );
WTriangleMesh2 expected( mesh );
WTriangleMesh expected( mesh );
TS_ASSERT_EQUALS( expected, mesh );
std::swap( mesh.m_triangles[0], mesh.m_triangles[1] );
......@@ -347,7 +347,7 @@ public:
*/
void testComponentDecomposition( void )
{
WTriangleMesh2 mesh( 25, 16 );
WTriangleMesh mesh( 25, 16 );
mesh.addVertex( wmath::WPosition( 1, 0, 0 ) ); // 0
mesh.addVertex( wmath::WPosition( 0, 1, 0 ) ); // 1
......@@ -392,11 +392,11 @@ public:
mesh.addTriangle( 16, 23, 24 ); // 14
mesh.addTriangle( 17, 23, 24 ); // 15
boost::shared_ptr< std::list< boost::shared_ptr< WTriangleMesh2 > > > components = tm_utils::componentDecomposition( mesh );
boost::shared_ptr< std::list< boost::shared_ptr< WTriangleMesh > > > components = tm_utils::componentDecomposition( mesh );
TS_ASSERT_EQUALS( components->size(), 7 );
std::list< boost::shared_ptr< WTriangleMesh2 > >::const_iterator cit = components->begin();
WTriangleMesh2 expected( 3, 1 );
std::list< boost::shared_ptr< WTriangleMesh > >::const_iterator cit = components->begin();
WTriangleMesh expected( 3, 1 );
expected.addVertex( wmath::WPosition( 1, 0, 0 ) );
expected.addVertex( wmath::WPosition( 0, 1, 0 ) );
expected.addVertex( wmath::WPosition( 2, 1, 0 ) );
......@@ -437,10 +437,9 @@ public:
*/
void testComponentDecompositionOnEmptyMesh( void )
{
WTriangleMesh2 mesh( 0, 0 );
boost::shared_ptr< std::list< boost::shared_ptr< WTriangleMesh2 > > > result = tm_utils::componentDecomposition( mesh );
WTriangleMesh mesh( 0, 0 );
boost::shared_ptr< std::list< boost::shared_ptr< WTriangleMesh > > > result = tm_utils::componentDecomposition( mesh );
TS_ASSERT( result->empty() );
}
};
#endif // WTRIANGLEMESH2_TEST_H
#endif // WTRIANGLEMESH_TEST_H
......@@ -32,7 +32,7 @@
#include "../../graphicsEngine/WROI.h"
#include "../../graphicsEngine/WGEGroupNode.h"
#include "../../graphicsEngine/WTriangleMesh2.h"
#include "../../graphicsEngine/WTriangleMesh.h"
#include "../../kernel/WModule.h"
#include "../../kernel/WModuleInputData.h"
......@@ -178,7 +178,7 @@ private:
osg::ref_ptr< osg::Geode > m_outputGeode; //!< Pointer to geode containing the glpyhs
boost::shared_ptr< WTriangleMesh2 > m_triMesh; //!< This triangle mesh is provided as output through the connector.
boost::shared_ptr< WTriangleMesh > m_triMesh; //!< This triangle mesh is provided as output through the connector.
bool m_showSelector; //!< flag indication if the temporary roi should be shown;
};
......
......@@ -35,7 +35,7 @@
#include "../../graphicsEngine/algorithms/WMarchingCubesAlgorithm.h"
#include "../../graphicsEngine/WTriangleMesh2.h"
#include "../../graphicsEngine/WTriangleMesh.h"
/**
* TODO(schurade): Document this!
*/
......@@ -51,7 +51,7 @@ public:
* \param pro pointer for progress
*/
WCreateSurfaceJob( boost::shared_ptr< WDataSetScalar const > input,
boost::shared_ptr< std::vector< boost::shared_ptr< WTriangleMesh2 > > > regionMeshes,
boost::shared_ptr< std::vector< boost::shared_ptr< WTriangleMesh > > > regionMeshes,
boost::shared_ptr<WProgressCombiner> progressCombiner,
boost::shared_ptr<WProgress>pro );
......@@ -90,7 +90,7 @@ private:
boost::shared_ptr< WGridRegular3D>m_grid; //!< stores pointer to grid
boost::shared_ptr< std::vector< boost::shared_ptr< WTriangleMesh2 > > >m_regionMeshes; //!< stores pointer
boost::shared_ptr< std::vector< boost::shared_ptr< WTriangleMesh > > >m_regionMeshes; //!< stores pointer
boost::shared_ptr<WProgressCombiner> m_progressCombiner; //!< stores pointer
......@@ -99,7 +99,7 @@ private:
template< typename T >
WCreateSurfaceJob< T >::WCreateSurfaceJob( boost::shared_ptr< WDataSetScalar const > input,
boost::shared_ptr< std::vector< boost::shared_ptr< WTriangleMesh2 > > > regionMeshes,
boost::shared_ptr< std::vector< boost::shared_ptr< WTriangleMesh > > > regionMeshes,
boost::shared_ptr<WProgressCombiner> progressCombiner,
boost::shared_ptr<WProgress>pro )
: WThreadedJobs< WDataSetScalar, size_t >( input ),
......@@ -143,7 +143,7 @@ void WCreateSurfaceJob< T >::compute( boost::shared_ptr< WDataSetScalar const >
boost::shared_ptr< WValueSet< float > > newValueSet = boost::shared_ptr< WValueSet< float > >(
new WValueSet< float >( 0, 1, tempData, W_DT_FLOAT ) );
WMarchingCubesAlgorithm mcAlgo;
boost::shared_ptr< WTriangleMesh2 >triMesh = mcAlgo.generateSurface( m_grid->getNbCoordsX(), m_grid->getNbCoordsY(), m_grid->getNbCoordsZ(),
boost::shared_ptr< WTriangleMesh >triMesh = mcAlgo.generateSurface( m_grid->getNbCoordsX(), m_grid->getNbCoordsY(), m_grid->getNbCoordsZ(),
m_grid->getTransformationMatrix(),
newValueSet->rawDataVectorPointer(),
0.9,
......@@ -154,7 +154,7 @@ void WCreateSurfaceJob< T >::compute( boost::shared_ptr< WDataSetScalar const >
}
else
{
( *m_regionMeshes )[job] = boost::shared_ptr< WTriangleMesh2 >( new WTriangleMesh2( 0, 0 ) );
( *m_regionMeshes )[job] = boost::shared_ptr< WTriangleMesh >( new WTriangleMesh( 0, 0 ) );
}
++*m_progress;
......
......@@ -172,8 +172,8 @@ void WMAtlasSurfaces::createSurfaces()
boost::shared_ptr<WThreadedJobs<WDataSetScalar, size_t> >job;
m_regionMeshes2 = boost::shared_ptr< std::vector< boost::shared_ptr< WTriangleMesh2 > > >(
new std::vector< boost::shared_ptr< WTriangleMesh2 > >( m_dataSet->getMax() + 1 ) );
m_regionMeshes2 = boost::shared_ptr< std::vector< boost::shared_ptr< WTriangleMesh > > >(
new std::vector< boost::shared_ptr< WTriangleMesh > >( m_dataSet->getMax() + 1 ) );
switch( ( *m_dataSet ).getValueSet()->getDataType() )
{
......
......@@ -37,7 +37,7 @@
#include "../../kernel/WModuleOutputData.h"
#include "../../graphicsEngine/WGEGroupNode.h"
#include "../../graphicsEngine/WTriangleMesh2.h"
#include "../../graphicsEngine/WTriangleMesh.h"
class WDataSetScalar;
......@@ -151,7 +151,7 @@ private:
boost::shared_ptr< const WDataSetScalar > m_dataSet; //!< pointer to dataSet to be able to access it throughout the whole module.
boost::shared_ptr< std::vector< boost::shared_ptr< WTriangleMesh2 > > >m_regionMeshes2; //!< stores pointers to all triangle meshes
boost::shared_ptr< std::vector< boost::shared_ptr< WTriangleMesh > > >m_regionMeshes2; //!< stores pointers to all triangle meshes
std::map< size_t, std::pair< std::string, std::string > >m_labels; //!< the labels with their id
......
......@@ -45,7 +45,7 @@
#include "../../graphicsEngine/WGEGeodeUtils.h"
#include "../../graphicsEngine/WGEGeometryUtils.h"
#include "../../graphicsEngine/WGEUtils.h"
#include "../../graphicsEngine/WTriangleMesh2.h"
#include "../../graphicsEngine/WTriangleMesh.h"
#include "../../kernel/WKernel.h"
#include "WMClusterSlicer.h"
#include "WMClusterSlicer.xpm"
......@@ -171,7 +171,7 @@ void WMClusterSlicer::moduleMain()