Commit d356fd65 authored by schurade's avatar schurade
Browse files

[CHANGE] removed the half voxel offset

parent 384e4ce5
...@@ -399,9 +399,9 @@ boost::shared_ptr<WTriangleMesh> WMarchingLegoAlgorithm::genSurfaceOneValue( siz ...@@ -399,9 +399,9 @@ boost::shared_ptr<WTriangleMesh> WMarchingLegoAlgorithm::genSurfaceOneValue( siz
resultPos4D[3] = m_matrix( 3, 0 ) * pos[0] + m_matrix( 3, 1 ) * pos[1] + m_matrix( 3, 2 ) * pos[2] + m_matrix( 3, 3 ) * 1; resultPos4D[3] = m_matrix( 3, 0 ) * pos[0] + m_matrix( 3, 1 ) * pos[1] + m_matrix( 3, 2 ) * pos[2] + m_matrix( 3, 3 ) * 1;
( *mapIterator ).second.newID = nextID; ( *mapIterator ).second.newID = nextID;
triMesh->addVertex( resultPos4D[0] / resultPos4D[3] - 0.5, triMesh->addVertex( resultPos4D[0] / resultPos4D[3],
resultPos4D[1] / resultPos4D[3] - 0.5, resultPos4D[1] / resultPos4D[3],
resultPos4D[2] / resultPos4D[3] - 0.5 ); resultPos4D[2] / resultPos4D[3] );
triMesh->addTextureCoordinate( texCoord ); triMesh->addTextureCoordinate( texCoord );
nextID++; nextID++;
mapIterator++; mapIterator++;
......
...@@ -253,9 +253,9 @@ template<typename T> boost::shared_ptr<WTriangleMesh> WMarchingLegoAlgorithm::ge ...@@ -253,9 +253,9 @@ template<typename T> boost::shared_ptr<WTriangleMesh> WMarchingLegoAlgorithm::ge
resultPos4D[3] = m_matrix( 3, 0 ) * pos[0] + m_matrix( 3, 1 ) * pos[1] + m_matrix( 3, 2 ) * pos[2] + m_matrix( 3, 3 ) * 1; resultPos4D[3] = m_matrix( 3, 0 ) * pos[0] + m_matrix( 3, 1 ) * pos[1] + m_matrix( 3, 2 ) * pos[2] + m_matrix( 3, 3 ) * 1;
( *mapIterator ).second.newID = nextID; ( *mapIterator ).second.newID = nextID;
triMesh->addVertex( resultPos4D[0] / resultPos4D[3] - 0.5, triMesh->addVertex( resultPos4D[0] / resultPos4D[3],
resultPos4D[1] / resultPos4D[3] - 0.5, resultPos4D[1] / resultPos4D[3],
resultPos4D[2] / resultPos4D[3] - 0.5 ); resultPos4D[2] / resultPos4D[3] );
triMesh->addTextureCoordinate( texCoord ); triMesh->addTextureCoordinate( texCoord );
nextID++; nextID++;
mapIterator++; mapIterator++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment