#include <PointData.h>


Public Types | |
| typedef sofa::helper::vector < T, Alloc >::size_type | size_type |
| size_type | |
| typedef sofa::helper::vector < T, Alloc >::reference | reference |
| reference to a value (read-write) | |
| typedef sofa::helper::vector < T, Alloc >::const_reference | const_reference |
| const reference to a value (read only) | |
Public Member Functions | |
| PointData (size_type n, const T &value) | |
| Constructor. | |
| PointData (int n, const T &value) | |
| Constructor. | |
| PointData (long n, const T &value) | |
| Constructor. | |
| PointData (size_type n) | |
| Constructor. | |
| PointData (const sofa::helper::vector< T, Alloc > &x) | |
| Constructor. | |
| PointData (typename PointData< T >::const_iterator first, typename PointData< T, Alloc >::const_iterator last) | |
| Constructor. | |
| PointData (void(*createFunc)(int, void *, T &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &)=pd_basicCreateFunc, void *createParam=(void *) NULL, void(*destroyFunc)(int, void *, T &)=pd_basicDestroyFunc, void *destroyParam=(void *) NULL) | |
| Optionnaly takes 2 parameters, a creation and a destruction function that will be called when adding/deleting elements. | |
| void | handleTopologyEvents (std::list< const core::componentmodel::topology::TopologyChange * >::const_iterator changeIt, std::list< const core::componentmodel::topology::TopologyChange * >::const_iterator &end) |
| Handle PointSetTopology related events, ignore others. | |
| void | setCreateFunction (void(*createFunc)(int, void *, T &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &)) |
| void | setDestroyFunction (void(*destroyFunc)(int, void *, T &)) |
| void | setCreateEdgeFunction (void(*createEdgeFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &)) |
| void | setDestroyEdgeFunction (void(*destroyEdgeFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &)) |
| void | setCreateTriangleFunction (void(*createTriangleFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &)) |
| void | setDestroyTriangleFunction (void(*destroyTriangleFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &)) |
| void | setCreateQuadFunction (void(*createQuadFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &)) |
| void | setDestroyQuadFunction (void(*destroyQuadFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &)) |
| void | setCreateTetrahedronFunction (void(*createTetrahedronFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &)) |
| void | setDestroyTetrahedronFunction (void(*destroyTetrahedronFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &)) |
| void | setDestroyParameter (void *destroyParam) |
| void | setCreateParameter (void *createParam) |
Private Member Functions | |
| void | swap (unsigned int i1, unsigned int i2) |
| Swaps values at indices i1 and i2. | |
| void | add (unsigned int nbPoints, const sofa::helper::vector< sofa::helper::vector< unsigned int > > &ancestors, const sofa::helper::vector< sofa::helper::vector< double > > &coefs) |
| Add some values. Values are added at the end of the vector. | |
| void | remove (const sofa::helper::vector< unsigned int > &index) |
| Remove the values corresponding to the points removed. | |
| void | renumber (const sofa::helper::vector< unsigned int > &index) |
| Reorder the values. | |
Private Attributes | |
| void(* | m_createFunc )(int, void *, T &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &) |
| Creation function, called when adding elements. | |
| void(* | m_destroyFunc )(int, void *, T &) |
| Destruction function, called when deleting elements. | |
| void(* | m_createEdgeFunc )(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) |
| Creation function, called when adding edges elements. | |
| void(* | m_destroyEdgeFunc )(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) |
| Destruction function, called when removing edges elements. | |
| void(* | m_createTriangleFunc )(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) |
| Creation function, called when adding triangles elements. | |
| void(* | m_destroyTriangleFunc )(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) |
| Destruction function, called when removing triangles elements. | |
| void(* | m_createQuadFunc )(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) |
| Creation function, called when adding quads elements. | |
| void(* | m_destroyQuadFunc )(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) |
| Destruction function, called when removing quads elements. | |
| void(* | m_createTetrahedronFunc )(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) |
| Creation function, called when adding tetrahedra elements. | |
| void(* | m_destroyTetrahedronFunc )(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) |
| Destruction function, called when removing tetrahedra elements. | |
| void * | m_createParam |
| Parameter to be passed to creation function. | |
| void * | m_destroyParam |
| Parameter to be passed to destruction function. | |
Automatically manages topology changes.
This class is a wrapper of class helper::vector that is made to take care transparently of all topology changes that might happen (non exhaustive list: points added, removed, fused, renumbered).
Definition at line 69 of file PointData.h.
| typedef sofa::helper::vector<T,Alloc>::const_reference sofa::component::topology::PointData< T, Alloc >::const_reference |
const reference to a value (read only)
Reimplemented from sofa::helper::vector< T, Alloc >.
Definition at line 77 of file PointData.h.
| typedef sofa::helper::vector<T,Alloc>::reference sofa::component::topology::PointData< T, Alloc >::reference |
reference to a value (read-write)
Reimplemented from sofa::helper::vector< T, Alloc >.
Definition at line 75 of file PointData.h.
| typedef sofa::helper::vector<T,Alloc>::size_type sofa::component::topology::PointData< T, Alloc >::size_type |
size_type
Reimplemented from sofa::helper::vector< T, Alloc >.
Definition at line 73 of file PointData.h.
| sofa::component::topology::PointData< T, Alloc >::PointData | ( | size_type | n, | |
| const T & | value | |||
| ) | [inline] |
| sofa::component::topology::PointData< T, Alloc >::PointData | ( | int | n, | |
| const T & | value | |||
| ) | [inline] |
| sofa::component::topology::PointData< T, Alloc >::PointData | ( | long | n, | |
| const T & | value | |||
| ) | [inline] |
| sofa::component::topology::PointData< T, Alloc >::PointData | ( | size_type | n | ) | [inline, explicit] |
| sofa::component::topology::PointData< T, Alloc >::PointData | ( | const sofa::helper::vector< T, Alloc > & | x | ) | [inline] |
| sofa::component::topology::PointData< T, Alloc >::PointData | ( | void(*)(int, void *, T &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &) | createFunc = pd_basicCreateFunc, |
|
| void * | createParam = (void*)NULL, |
|||
| void(*)(int, void *, T &) | destroyFunc = pd_basicDestroyFunc, |
|||
| void * | destroyParam = (void*)NULL | |||
| ) | [inline] |
Optionnaly takes 2 parameters, a creation and a destruction function that will be called when adding/deleting elements.
Definition at line 102 of file PointData.h.
| void sofa::component::topology::PointData< T, Alloc >::add | ( | unsigned int | nbPoints, | |
| const sofa::helper::vector< sofa::helper::vector< unsigned int > > & | ancestors, | |||
| const sofa::helper::vector< sofa::helper::vector< double > > & | coefs | |||
| ) | [inline, private] |
Add some values. Values are added at the end of the vector.
Definition at line 159 of file PointData.inl.
References sofa::component::topology::PointData< T, Alloc >::m_createFunc, and sofa::component::topology::PointData< T, Alloc >::m_createParam.
| void sofa::component::topology::PointData< T, Alloc >::handleTopologyEvents | ( | std::list< const core::componentmodel::topology::TopologyChange * >::const_iterator | changeIt, | |
| std::list< const core::componentmodel::topology::TopologyChange * >::const_iterator & | end | |||
| ) | [inline] |
Handle PointSetTopology related events, ignore others.
Definition at line 51 of file PointData.inl.
References sofa::component::topology::EdgesAdded::edgeIndexArray, sofa::core::componentmodel::topology::EDGESADDED, sofa::core::componentmodel::topology::EDGESREMOVED, sofa::component::topology::EdgesRemoved::getArray(), sofa::component::topology::TrianglesRemoved::getArray(), sofa::component::topology::TetrahedraRemoved::getArray(), sofa::component::topology::PointData< T, Alloc >::m_createEdgeFunc, sofa::component::topology::PointData< T, Alloc >::m_createParam, sofa::component::topology::PointData< T, Alloc >::m_createTetrahedronFunc, sofa::component::topology::PointData< T, Alloc >::m_createTriangleFunc, sofa::component::topology::PointData< T, Alloc >::m_destroyEdgeFunc, sofa::component::topology::PointData< T, Alloc >::m_destroyTetrahedronFunc, sofa::component::topology::PointData< T, Alloc >::m_destroyTriangleFunc, sofa::core::componentmodel::topology::POINTSADDED, sofa::core::componentmodel::topology::POINTSINDICESSWAP, sofa::core::componentmodel::topology::POINTSREMOVED, sofa::core::componentmodel::topology::POINTSRENUMBERING, sofa::component::topology::PointData< T, Alloc >::renumber(), sofa::component::topology::PointData< T, Alloc >::swap(), sofa::core::componentmodel::topology::TETRAHEDRAADDED, sofa::core::componentmodel::topology::TETRAHEDRAREMOVED, sofa::component::topology::TetrahedraAdded::tetrahedronIndexArray, sofa::component::topology::TrianglesAdded::triangleIndexArray, sofa::core::componentmodel::topology::TRIANGLESADDED, and sofa::core::componentmodel::topology::TRIANGLESREMOVED.
Referenced by sofa::component::mass::DiagonalMass< DataTypes, MassType >::handleTopologyChange().
| void sofa::component::topology::PointData< T, Alloc >::remove | ( | const sofa::helper::vector< unsigned int > & | index | ) | [inline, private] |
Remove the values corresponding to the points removed.
Definition at line 184 of file PointData.inl.
References sofa::component::topology::PointData< T, Alloc >::m_destroyFunc, sofa::component::topology::PointData< T, Alloc >::m_destroyParam, and sofa::component::topology::PointData< T, Alloc >::swap().
| void sofa::component::topology::PointData< T, Alloc >::renumber | ( | const sofa::helper::vector< unsigned int > & | index | ) | [inline, private] |
Reorder the values.
Definition at line 200 of file PointData.inl.
Referenced by sofa::component::topology::PointData< T, Alloc >::handleTopologyEvents().
| void sofa::component::topology::PointData< T, Alloc >::setCreateEdgeFunction | ( | void(*)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) | createEdgeFunc | ) | [inline] |
Definition at line 130 of file PointData.h.
Referenced by sofa::component::mass::DiagonalMass< DataTypes, MassType >::init().
| void sofa::component::topology::PointData< T, Alloc >::setCreateFunction | ( | void(*)(int, void *, T &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &) | createFunc | ) | [inline] |
Definition at line 118 of file PointData.h.
Referenced by sofa::component::mass::DiagonalMass< DataTypes, MassType >::init().
| void sofa::component::topology::PointData< T, Alloc >::setCreateParameter | ( | void * | createParam | ) | [inline] |
Definition at line 173 of file PointData.h.
Referenced by sofa::component::mass::DiagonalMass< DataTypes, MassType >::init().
| void sofa::component::topology::PointData< T, Alloc >::setCreateQuadFunction | ( | void(*)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) | createQuadFunc | ) | [inline] |
Definition at line 148 of file PointData.h.
| void sofa::component::topology::PointData< T, Alloc >::setCreateTetrahedronFunction | ( | void(*)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) | createTetrahedronFunc | ) | [inline] |
Definition at line 158 of file PointData.h.
Referenced by sofa::component::mass::DiagonalMass< DataTypes, MassType >::init().
| void sofa::component::topology::PointData< T, Alloc >::setCreateTriangleFunction | ( | void(*)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) | createTriangleFunc | ) | [inline] |
Definition at line 138 of file PointData.h.
Referenced by sofa::component::mass::DiagonalMass< DataTypes, MassType >::init().
| void sofa::component::topology::PointData< T, Alloc >::setDestroyEdgeFunction | ( | void(*)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) | destroyEdgeFunc | ) | [inline] |
Definition at line 134 of file PointData.h.
Referenced by sofa::component::mass::DiagonalMass< DataTypes, MassType >::init().
| void sofa::component::topology::PointData< T, Alloc >::setDestroyFunction | ( | void(*)(int, void *, T &) | destroyFunc | ) | [inline] |
Definition at line 125 of file PointData.h.
| void sofa::component::topology::PointData< T, Alloc >::setDestroyParameter | ( | void * | destroyParam | ) | [inline] |
Definition at line 168 of file PointData.h.
Referenced by sofa::component::mass::DiagonalMass< DataTypes, MassType >::init().
| void sofa::component::topology::PointData< T, Alloc >::setDestroyQuadFunction | ( | void(*)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) | destroyQuadFunc | ) | [inline] |
Definition at line 153 of file PointData.h.
| void sofa::component::topology::PointData< T, Alloc >::setDestroyTetrahedronFunction | ( | void(*)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) | destroyTetrahedronFunc | ) | [inline] |
Definition at line 163 of file PointData.h.
Referenced by sofa::component::mass::DiagonalMass< DataTypes, MassType >::init().
| void sofa::component::topology::PointData< T, Alloc >::setDestroyTriangleFunction | ( | void(*)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) | destroyTriangleFunc | ) | [inline] |
Definition at line 143 of file PointData.h.
Referenced by sofa::component::mass::DiagonalMass< DataTypes, MassType >::init().
| void sofa::component::topology::PointData< T, Alloc >::swap | ( | unsigned int | i1, | |
| unsigned int | i2 | |||
| ) | [inline, private] |
Swaps values at indices i1 and i2.
Definition at line 151 of file PointData.inl.
Referenced by sofa::component::topology::PointData< T, Alloc >::handleTopologyEvents(), and sofa::component::topology::PointData< T, Alloc >::remove().
void(* sofa::component::topology::PointData< T, Alloc >::m_createEdgeFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) [private] |
Creation function, called when adding edges elements.
Referenced by sofa::component::topology::PointData< T, Alloc >::handleTopologyEvents(), and sofa::component::topology::PointData< Inherit::MappingData1D >::setCreateEdgeFunction().
void(* sofa::component::topology::PointData< T, Alloc >::m_createFunc)(int, void *, T &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &) [private] |
Creation function, called when adding elements.
Referenced by sofa::component::topology::PointData< T, Alloc >::add(), and sofa::component::topology::PointData< Inherit::MappingData1D >::setCreateFunction().
void* sofa::component::topology::PointData< T, Alloc >::m_createParam [private] |
Parameter to be passed to creation function.
Warning : construction and destruction of this object is not of the responsibility of PointData.
Definition at line 232 of file PointData.h.
Referenced by sofa::component::topology::PointData< T, Alloc >::add(), sofa::component::topology::PointData< T, Alloc >::handleTopologyEvents(), and sofa::component::topology::PointData< Inherit::MappingData1D >::setCreateParameter().
void(* sofa::component::topology::PointData< T, Alloc >::m_createQuadFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) [private] |
Creation function, called when adding quads elements.
Referenced by sofa::component::topology::PointData< Inherit::MappingData1D >::setCreateQuadFunction().
void(* sofa::component::topology::PointData< T, Alloc >::m_createTetrahedronFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) [private] |
Creation function, called when adding tetrahedra elements.
Referenced by sofa::component::topology::PointData< T, Alloc >::handleTopologyEvents(), and sofa::component::topology::PointData< Inherit::MappingData1D >::setCreateTetrahedronFunction().
void(* sofa::component::topology::PointData< T, Alloc >::m_createTriangleFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) [private] |
Creation function, called when adding triangles elements.
Referenced by sofa::component::topology::PointData< T, Alloc >::handleTopologyEvents(), and sofa::component::topology::PointData< Inherit::MappingData1D >::setCreateTriangleFunction().
void(* sofa::component::topology::PointData< T, Alloc >::m_destroyEdgeFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) [private] |
Destruction function, called when removing edges elements.
Referenced by sofa::component::topology::PointData< T, Alloc >::handleTopologyEvents(), and sofa::component::topology::PointData< Inherit::MappingData1D >::setDestroyEdgeFunction().
void(* sofa::component::topology::PointData< T, Alloc >::m_destroyFunc)(int, void *, T &) [private] |
Destruction function, called when deleting elements.
Referenced by sofa::component::topology::PointData< T, Alloc >::remove(), and sofa::component::topology::PointData< Inherit::MappingData1D >::setDestroyFunction().
void* sofa::component::topology::PointData< T, Alloc >::m_destroyParam [private] |
Parameter to be passed to destruction function.
Warning : construction and destruction of this object is not of the responsibility of PointData.
Definition at line 238 of file PointData.h.
Referenced by sofa::component::topology::PointData< T, Alloc >::remove(), and sofa::component::topology::PointData< Inherit::MappingData1D >::setDestroyParameter().
void(* sofa::component::topology::PointData< T, Alloc >::m_destroyQuadFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) [private] |
Destruction function, called when removing quads elements.
Referenced by sofa::component::topology::PointData< Inherit::MappingData1D >::setDestroyQuadFunction().
void(* sofa::component::topology::PointData< T, Alloc >::m_destroyTetrahedronFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) [private] |
Destruction function, called when removing tetrahedra elements.
Referenced by sofa::component::topology::PointData< T, Alloc >::handleTopologyEvents(), and sofa::component::topology::PointData< Inherit::MappingData1D >::setDestroyTetrahedronFunction().
void(* sofa::component::topology::PointData< T, Alloc >::m_destroyTriangleFunc)(const sofa::helper::vector< unsigned int > &, void *, helper::vector< T > &) [private] |
Destruction function, called when removing triangles elements.
Referenced by sofa::component::topology::PointData< T, Alloc >::handleTopologyEvents(), and sofa::component::topology::PointData< Inherit::MappingData1D >::setDestroyTriangleFunction().
1.5.7.1