|
fw4spl
|
Helper to manage Mesh. Lock the mesh buffer before to modify it. More...
#include <Mesh.hpp>
Public Member Functions | |
| FWDATATOOLS_API | Mesh (::fwData::Mesh::sptr mesh) |
| FWDATATOOLS_API void | updateLock () |
| Updates locks on all internal data Array of Mesh. | |
| FWDATATOOLS_API::fwData::Mesh::Id | insertNextPoint (const ::fwData::Mesh::PointValueType p[3]) |
| Insert a point into the mesh. Reallocates the point array if needed. More... | |
| FWDATATOOLS_API::fwData::Mesh::Id | insertNextPoint (::fwData::Mesh::PointValueType x,::fwData::Mesh::PointValueType y,::fwData::Mesh::PointValueType z) |
| Insert a point into the mesh. More... | |
| FWDATATOOLS_API void | setPoint (::fwData::Mesh::Id id, const ::fwData::Mesh::PointValueType p[3]) |
| Set a point coordinates. The mesh must be allocated before calling this method. More... | |
| FWDATATOOLS_API void | setPoint (::fwData::Mesh::Id id,::fwData::Mesh::PointValueType x,::fwData::Mesh::PointValueType y,::fwData::Mesh::PointValueType z) |
| Set a point coordinates. More... | |
| FWDATATOOLS_API void | setPointColor (::fwData::Mesh::Id id, const ::fwData::Mesh::ColorValueType c[4]) |
| Set a point color. More... | |
| FWDATATOOLS_API void | setCellColor (::fwData::Mesh::Id id, const ::fwData::Mesh::ColorValueType c[4]) |
| Set a cell color. More... | |
| FWDATATOOLS_API void | setPointNormal (::fwData::Mesh::Id id, const ::fwData::Mesh::NormalValueType n[3]) |
| Set a point normal. More... | |
| FWDATATOOLS_API void | setCellNormal (::fwData::Mesh::Id id, const ::fwData::Mesh::NormalValueType n[3]) |
| Set a cell normal. More... | |
| FWDATATOOLS_API void | setPointTexCoord (::fwData::Mesh::Id id, const ::fwData::Mesh::TexCoordValueType t[2]) |
| Set a point texCoord. More... | |
| FWDATATOOLS_API void | setCellTexCoord (::fwData::Mesh::Id id, const ::fwData::Mesh::TexCoordValueType t[2]) |
| Set a cell texCoord. More... | |
| FWDATATOOLS_API::fwData::Mesh::Id | insertNextCell (::fwData::Mesh::CellTypesEnum type, const ::fwData::Mesh::CellValueType *cell, size_t nb) |
| Insert a cell into the mesh. More... | |
| FWDATATOOLS_API::fwData::Mesh::Id | insertNextCell (::fwData::Mesh::CellValueType p) |
| Insert a cell into the mesh. More... | |
| FWDATATOOLS_API::fwData::Mesh::Id | insertNextCell (::fwData::Mesh::CellValueType p1,::fwData::Mesh::CellValueType p2) |
| Insert a cell into the mesh. More... | |
| FWDATATOOLS_API::fwData::Mesh::Id | insertNextCell (::fwData::Mesh::CellValueType p1,::fwData::Mesh::CellValueType p2,::fwData::Mesh::CellValueType p3) |
| Insert a cell into the mesh. More... | |
| FWDATATOOLS_API::fwData::Mesh::Id | insertNextCell (::fwData::Mesh::CellValueType p1,::fwData::Mesh::CellValueType p2,::fwData::Mesh::CellValueType p3,::fwData::Mesh::CellValueType p4,::fwData::Mesh::CellTypesEnum type=::fwData::Mesh::QUAD) |
| Insert a cell into the mesh. More... | |
| template<typename T > | |
| ::fwData::Mesh::Id | insertNextCell (::fwData::Mesh::CellTypesEnum type, const T &pointsBegin, const T &pointsEnd) |
| Insert a cell into the mesh. More... | |
| FWDATATOOLS_API::fwData::Mesh::PointsMultiArrayType | getPoints () const |
| Returns the internal corresponding array as a boost::multi_array_ref. | |
| FWDATATOOLS_API::fwData::Mesh::CellTypesMultiArrayType | getCellTypes () const |
| Returns the internal corresponding array as a boost::multi_array_ref. | |
| FWDATATOOLS_API::fwData::Mesh::CellDataMultiArrayType | getCellData () const |
| Returns the internal corresponding array as a boost::multi_array_ref. | |
| FWDATATOOLS_API::fwData::Mesh::CellDataOffsetsMultiArrayType | getCellDataOffsets () const |
| Returns the internal corresponding array as a boost::multi_array_ref. | |
| FWDATATOOLS_API::fwData::Mesh::PointColorsMultiArrayType | getPointColors () const |
| Returns the internal corresponding array as a boost::multi_array_ref. | |
| FWDATATOOLS_API::fwData::Mesh::CellColorsMultiArrayType | getCellColors () const |
| Returns the internal corresponding array as a boost::multi_array_ref. | |
| FWDATATOOLS_API::fwData::Mesh::PointNormalsMultiArrayType | getPointNormals () const |
| Returns the internal corresponding array as a boost::multi_array_ref. | |
| FWDATATOOLS_API::fwData::Mesh::CellNormalsMultiArrayType | getCellNormals () const |
| Returns the internal corresponding array as a boost::multi_array_ref. | |
| FWDATATOOLS_API::fwData::Mesh::PointTexCoordsMultiArrayType | getPointTexCoords () const |
| Returns the internal corresponding array as a boost::multi_array_ref. | |
| FWDATATOOLS_API::fwData::Mesh::CellTexCoordsMultiArrayType | getCellTexCoords () const |
| Returns the internal corresponding array as a boost::multi_array_ref. | |
| FWDATATOOLS_API::fwData::Mesh::csptr | getMesh () const |
| Returns the internal fwData::Mesh. | |
| FWDATATOOLS_API bool | isClosed () |
| Return true if the mesh is closed. The result is computed for each call. | |
Helper to manage Mesh. Lock the mesh buffer before to modify it.
Definition at line 27 of file core/fwDataTools/include/fwDataTools/helper/Mesh.hpp.
| fwData::Mesh::Id fwDataTools::helper::Mesh::insertNextCell | ( | ::fwData::Mesh::CellTypesEnum | type, |
| const ::fwData::Mesh::CellValueType * | cell, | ||
| size_t | nb | ||
| ) |
Insert a cell into the mesh.
Reallocates the mesh concerned arrays if needed.
| fwData::Exception |
Definition at line 169 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
References SLM_ASSERT.
Referenced by fwVtkIO::helper::Mesh::fromVTKGrid(), and fwVtkIO::helper::Mesh::fromVTKMesh().
Here is the caller graph for this function:| fwData::Mesh::Id fwDataTools::helper::Mesh::insertNextCell | ( | ::fwData::Mesh::CellValueType | p | ) |
Insert a cell into the mesh.
Definition at line 232 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
| fwData::Mesh::Id fwDataTools::helper::Mesh::insertNextCell | ( | ::fwData::Mesh::CellValueType | p1, |
| ::fwData::Mesh::CellValueType | p2 | ||
| ) |
Insert a cell into the mesh.
Definition at line 240 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
| fwData::Mesh::Id fwDataTools::helper::Mesh::insertNextCell | ( | ::fwData::Mesh::CellValueType | p1, |
| ::fwData::Mesh::CellValueType | p2, | ||
| ::fwData::Mesh::CellValueType | p3 | ||
| ) |
Insert a cell into the mesh.
Definition at line 249 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
| fwData::Mesh::Id fwDataTools::helper::Mesh::insertNextCell | ( | ::fwData::Mesh::CellValueType | p1, |
| ::fwData::Mesh::CellValueType | p2, | ||
| ::fwData::Mesh::CellValueType | p3, | ||
| ::fwData::Mesh::CellValueType | p4, | ||
| ::fwData::Mesh::CellTypesEnum | type = ::fwData::Mesh::QUAD |
||
| ) |
Insert a cell into the mesh.
Definition at line 259 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
| ::fwData::Mesh::Id fwDataTools::helper::Mesh::insertNextCell | ( | ::fwData::Mesh::CellTypesEnum | type, |
| const T & | pointsBegin, | ||
| const T & | pointsEnd | ||
| ) |
Insert a cell into the mesh.
| fwData::Mesh::Id fwDataTools::helper::Mesh::insertNextPoint | ( | const ::fwData::Mesh::PointValueType | p[3] | ) |
Insert a point into the mesh. Reallocates the point array if needed.
| p | point coordinates |
| fwData::Exception |
Definition at line 83 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
Referenced by fwVtkIO::helper::Mesh::fromVTKGrid(), and fwVtkIO::helper::Mesh::fromVTKMesh().
Here is the caller graph for this function:| fwData::Mesh::Id fwDataTools::helper::Mesh::insertNextPoint | ( | ::fwData::Mesh::PointValueType | x, |
| ::fwData::Mesh::PointValueType | y, | ||
| ::fwData::Mesh::PointValueType | z | ||
| ) |
Insert a point into the mesh.
Definition at line 99 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
| void fwDataTools::helper::Mesh::setCellColor | ( | ::fwData::Mesh::Id | id, |
| const ::fwData::Mesh::ColorValueType | c[4] | ||
| ) |
Set a cell color.
Depending on the type of allocated cell-colors array (RGB or RGBA), 3 or 4 points will be read from p. The color array must be allocated before calling this method.
| id | cell index |
| c | color |
| fwData::Exception |
Definition at line 134 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
Referenced by fwDataTools::Mesh::colorizeMeshCells(), fwVtkIO::helper::Mesh::fromVTKGrid(), and fwVtkIO::helper::Mesh::fromVTKMesh().
Here is the caller graph for this function:| void fwDataTools::helper::Mesh::setCellNormal | ( | ::fwData::Mesh::Id | id, |
| const ::fwData::Mesh::NormalValueType | n[3] | ||
| ) |
Set a cell normal.
The normal array must be allocated before calling this method.
| id | cell index |
| n | normal |
| fwData::Exception |
Definition at line 148 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
Referenced by fwVtkIO::helper::Mesh::fromVTKGrid(), and fwVtkIO::helper::Mesh::fromVTKMesh().
Here is the caller graph for this function:| void fwDataTools::helper::Mesh::setCellTexCoord | ( | ::fwData::Mesh::Id | id, |
| const ::fwData::Mesh::TexCoordValueType | t[2] | ||
| ) |
Set a cell texCoord.
The texCoord array must be allocated before calling this method.
| id | cell index |
| t | texCoord |
| fwData::Exception |
Definition at line 162 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
Referenced by fwVtkIO::helper::Mesh::fromVTKGrid(), and fwVtkIO::helper::Mesh::fromVTKMesh().
Here is the caller graph for this function:| void fwDataTools::helper::Mesh::setPoint | ( | ::fwData::Mesh::Id | id, |
| const ::fwData::Mesh::PointValueType | p[3] | ||
| ) |
Set a point coordinates. The mesh must be allocated before calling this method.
| id | point index |
| p | point coordinates |
| fwData::Exception |
Definition at line 109 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
| void fwDataTools::helper::Mesh::setPoint | ( | ::fwData::Mesh::Id | id, |
| ::fwData::Mesh::PointValueType | x, | ||
| ::fwData::Mesh::PointValueType | y, | ||
| ::fwData::Mesh::PointValueType | z | ||
| ) |
Set a point coordinates.
Definition at line 116 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
| void fwDataTools::helper::Mesh::setPointColor | ( | ::fwData::Mesh::Id | id, |
| const ::fwData::Mesh::ColorValueType | c[4] | ||
| ) |
Set a point color.
Depending on the type of allocated point-colors array (RGB or RGBA), 3 or 4 points will be read from p. The color array must be allocated before calling this method.
| id | point index |
| c | color |
| fwData::Exception |
Definition at line 127 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
Referenced by fwDataTools::Mesh::colorizeMeshPoints(), fwVtkIO::helper::Mesh::fromVTKGrid(), and fwVtkIO::helper::Mesh::fromVTKMesh().
Here is the caller graph for this function:| void fwDataTools::helper::Mesh::setPointNormal | ( | ::fwData::Mesh::Id | id, |
| const ::fwData::Mesh::NormalValueType | n[3] | ||
| ) |
Set a point normal.
The normal array must be allocated before calling this method.
| id | point index |
| n | normal |
| fwData::Exception |
Definition at line 141 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
Referenced by fwVtkIO::helper::Mesh::fromVTKGrid(), and fwVtkIO::helper::Mesh::fromVTKMesh().
Here is the caller graph for this function:| void fwDataTools::helper::Mesh::setPointTexCoord | ( | ::fwData::Mesh::Id | id, |
| const ::fwData::Mesh::TexCoordValueType | t[2] | ||
| ) |
Set a point texCoord.
The texCoord array must be allocated before calling this method.
| id | point index |
| t | texCoord |
| fwData::Exception |
Definition at line 155 of file core/fwDataTools/src/fwDataTools/helper/Mesh.cpp.
Referenced by fwVtkIO::helper::Mesh::fromVTKGrid(), and fwVtkIO::helper::Mesh::fromVTKMesh().
Here is the caller graph for this function: