fw4spl
|
This helper generates a mesh using specified structure (quad or triangle). More...
#include <Mesh.hpp>
Public Types | |
typedef std::map< Point,::fwData::Mesh::Id > | PointsMapType |
typedef std::array< double, 3 > | PositionType |
typedef std::array< size_t, 3 > | OrganizationType |
Static Public Member Functions | |
static FWDATATOOLS_API void | initRand () |
Initialize 'rand' seed. | |
static FWDATATOOLS_API void | generateCellNormals (::fwData::Mesh::sptr mesh) |
Generate cell normals for the mesh. More... | |
static FWDATATOOLS_API void | generatePointNormals (::fwData::Mesh::sptr mesh) |
Generate point normals for the mesh. More... | |
static FWDATATOOLS_API void | shakeNormals (::fwData::Array::sptr array) |
Shake Array of Normals. More... | |
static FWDATATOOLS_API void | shakePointNormals (::fwData::Mesh::sptr mesh) |
Shake point Normals. More... | |
static FWDATATOOLS_API void | shakeCellNormals (::fwData::Mesh::sptr mesh) |
Shake cell Normals. More... | |
static FWDATATOOLS_API void | shakePoint (::fwData::Mesh::sptr mesh) |
Shake points of the mesh. More... | |
static FWDATATOOLS_API void | colorizeMeshPoints (::fwData::Mesh::sptr mesh) |
Colorize mesh (vertex point color). More... | |
static FWDATATOOLS_API void | colorizeMeshCells (::fwData::Mesh::sptr mesh) |
Colorize mesh (cell color). More... | |
static FWDATATOOLS_API bool | hasUniqueCellType (::fwData::Mesh::csptr mesh,::fwData::Mesh::CellTypes cell) |
static FWDATATOOLS_API void | transform (fwData::Mesh::csptr inMesh,::fwData::Mesh::sptr outMesh,::fwData::TransformationMatrix3D::csptr t) |
Apply a transformation 4x4 from an input mesh to an output mesh. | |
static FWDATATOOLS_API void | transform (::fwData::Mesh::sptr mesh,::fwData::TransformationMatrix3D::csptr t) |
Apply a transformation 4x4 on a mesh. | |
static FWDATATOOLS_API void | colorizeMeshPoints (const ::fwData::Mesh::sptr &mesh, const std::uint8_t colorR, const std::uint8_t colorG, const std::uint8_t colorB, const std::uint8_t colorA=255) |
Colorize the mesh points with the given color. More... | |
static FWDATATOOLS_API void | colorizeMeshPoints (const ::fwData::Mesh::sptr &_mesh, const std::vector< size_t > &_vectorNumTriangle, const std::uint8_t _colorR, const std::uint8_t colorG, const std::uint8_t colorB, const std::uint8_t _colorA=255) |
Colorize the mesh points associated to the triangle in _vectorNumTriangle. More... | |
static FWDATATOOLS_API void | colorizeMeshCells (const ::fwData::Mesh::sptr &mesh, const std::uint8_t colorR, const std::uint8_t colorG, const std::uint8_t colorB, const std::uint8_t _colorA=255) |
Colorize the mesh cells with the given rgb color. More... | |
static FWDATATOOLS_API void | colorizeMeshCells (const ::fwData::Mesh::sptr &mesh, const std::vector< size_t > &triangleIndexVector, const std::uint8_t colorR, const std::uint8_t colorG, const std::uint8_t colorB, const std::uint8_t _colorA=255) |
Colorize the cells in vectorNumTriangle. More... | |
This helper generates a mesh using specified structure (quad or triangle).
Definition at line 24 of file core/fwDataTools/include/fwDataTools/Mesh.hpp.
|
static |
Colorize mesh (cell color).
[in] | mesh | fwData::Mesh mesh structure to colorize. |
Definition at line 448 of file core/fwDataTools/src/fwDataTools/Mesh.cpp.
References fwDataTools::helper::Mesh::setCellColor().
Referenced by fwTest::generator::Mesh::generateMesh(), and Tuto14MeshGenerator::SMeshModifier::updating().
|
static |
Colorize the mesh cells with the given rgb color.
Definition at line 659 of file core/fwDataTools/src/fwDataTools/Mesh.cpp.
References fwDataTools::helper::Array::getBuffer(), fwData::Mesh::s_CELL_COLORS_MODIFIED_SIG, and SLM_ASSERT.
|
static |
Colorize the cells in vectorNumTriangle.
Definition at line 696 of file core/fwDataTools/src/fwDataTools/Mesh.cpp.
References fwDataTools::helper::Array::getBuffer(), fwData::Mesh::s_CELL_COLORS_MODIFIED_SIG, and SLM_ASSERT.
|
static |
Colorize mesh (vertex point color).
[in] | mesh | fwData::Mesh mesh structure to colorize. |
Definition at line 430 of file core/fwDataTools/src/fwDataTools/Mesh.cpp.
References fwDataTools::helper::Mesh::setPointColor().
Referenced by fwTest::generator::Mesh::generateMesh(), Tuto14MeshGenerator::AlgoMeshDeformation::initSimu(), and Tuto14MeshGenerator::SMeshModifier::updating().
|
static |
Colorize the mesh points with the given color.
Definition at line 569 of file core/fwDataTools/src/fwDataTools/Mesh.cpp.
References fwDataTools::helper::Array::begin(), fwData::Mesh::s_POINT_COLORS_MODIFIED_SIG, and SLM_ASSERT.
|
static |
Colorize the mesh points associated to the triangle in _vectorNumTriangle.
Definition at line 606 of file core/fwDataTools/src/fwDataTools/Mesh.cpp.
References fwDataTools::helper::ArrayGetter::begin(), fwDataTools::helper::Array::getBuffer(), fwData::Mesh::s_POINT_COLORS_MODIFIED_SIG, and SLM_ASSERT.
|
static |
Generate cell normals for the mesh.
[out] | mesh | fwData::Mesh structure to fill with cell normals. |
Definition at line 202 of file core/fwDataTools/src/fwDataTools/Mesh.cpp.
Referenced by fwTest::generator::Mesh::generateMesh(), and Tuto14MeshGenerator::SMeshModifier::updating().
|
static |
Generate point normals for the mesh.
[out] | mesh | fwData::Mesh structure to fill with cell normals. |
Definition at line 319 of file core/fwDataTools/src/fwDataTools/Mesh.cpp.
Referenced by Tuto14MeshGenerator::AlgoMeshDeformation::computeSimu(), fwTest::generator::Mesh::generateMesh(), vtkSimpleMesh::SSimpleMeshDeformation::stopDeformation(), and Tuto14MeshGenerator::SMeshModifier::updating().
|
static |
[in] | mesh | fwData::Mesh mesh structure to find cell type. |
[in] | cell | CellTypes to find in mesh. |
Definition at line 47 of file core/fwDataTools/src/fwDataTools/Mesh.cpp.
References fwDataTools::helper::MeshGetter::getCellTypes().
Referenced by fwGdcmIO::container::DicomSurface::DicomSurface(), and fwDataIO::writer::MeshWriter::write().
|
static |
Shake cell Normals.
[out] | mesh | fwData::Mesh structure to shake normals. |
Definition at line 423 of file core/fwDataTools/src/fwDataTools/Mesh.cpp.
Referenced by Tuto14MeshGenerator::SMeshModifier::updating().
|
static |
Shake Array of Normals.
Array must have 3 float components, 1 dimension. Otherwise, shakeNormals will do nothing.
[out] | array | mesh's array containing normals. |
Definition at line 386 of file core/fwDataTools/src/fwDataTools/Mesh.cpp.
References fwDataTools::helper::Array::getBuffer().
|
static |
Shake points of the mesh.
[out] | mesh | fwData::Mesh structure to shake. |
Definition at line 468 of file core/fwDataTools/src/fwDataTools/Mesh.cpp.
References fwDataTools::helper::ArrayGetter::begin(), fwDataTools::helper::Array::begin(), fwDataTools::TransformationMatrix3D::getMatrixFromTF3D(), fwDataTools::helper::Mesh::getPoints(), SLM_ASSERT, and transform().
Referenced by fwTest::generator::Mesh::generateMesh(), and Tuto14MeshGenerator::SMeshModifier::updating().
|
static |
Shake point Normals.
[out] | mesh | fwData::Mesh structure to shake normals. |
Definition at line 416 of file core/fwDataTools/src/fwDataTools/Mesh.cpp.
Referenced by Tuto14MeshGenerator::SMeshModifier::updating().