#include <TetrahedronData.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 | |
| TetrahedronData (size_type n, const T &value) | |
| Constructor. | |
| TetrahedronData (int n, const T &value) | |
| Constructor. | |
| TetrahedronData (long n, const T &value) | |
| Constructor. | |
| TetrahedronData (size_type n) | |
| Constructor. | |
| TetrahedronData (const sofa::helper::vector< T, Alloc > &x) | |
| Constructor. | |
| TetrahedronData (typename TetrahedronData< T >::const_iterator first, typename TetrahedronData< T, Alloc >::const_iterator last) | |
| Constructor. | |
| TetrahedronData (void(*createFunc)(int, void *, T &, const Tetrahedron &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &)=td_basicCreateFunc, void *createParam=(void *) NULL, void(*destroyFunc)(int, void *, T &)=td_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 TetrahedronSetTopology related events, ignore others. | |
| void | setCreateFunction (void(*createFunc)(int, void *, T &, const Tetrahedron &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &)) |
| void | setDestroyFunction (void(*destroyFunc)(int, void *, 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 nbTetrahedra, const sofa::helper::vector< Tetrahedron > &tetrahedron, 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 Tetrahedra removed. | |
Private Attributes | |
| void(* | m_createFunc )(int, void *, T &, const Tetrahedron &, 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_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: Tetrahedra added, removed, fused, renumbered).
Definition at line 72 of file TetrahedronData.h.
| typedef sofa::helper::vector<T,Alloc>::const_reference sofa::component::topology::TetrahedronData< T, Alloc >::const_reference |
const reference to a value (read only)
Reimplemented from sofa::helper::vector< T, Alloc >.
Definition at line 80 of file TetrahedronData.h.
| typedef sofa::helper::vector<T,Alloc>::reference sofa::component::topology::TetrahedronData< T, Alloc >::reference |
reference to a value (read-write)
Reimplemented from sofa::helper::vector< T, Alloc >.
Definition at line 78 of file TetrahedronData.h.
| typedef sofa::helper::vector<T,Alloc>::size_type sofa::component::topology::TetrahedronData< T, Alloc >::size_type |
size_type
Reimplemented from sofa::helper::vector< T, Alloc >.
Definition at line 76 of file TetrahedronData.h.
| sofa::component::topology::TetrahedronData< T, Alloc >::TetrahedronData | ( | size_type | n, | |
| const T & | value | |||
| ) | [inline] |
| sofa::component::topology::TetrahedronData< T, Alloc >::TetrahedronData | ( | int | n, | |
| const T & | value | |||
| ) | [inline] |
| sofa::component::topology::TetrahedronData< T, Alloc >::TetrahedronData | ( | long | n, | |
| const T & | value | |||
| ) | [inline] |
| sofa::component::topology::TetrahedronData< T, Alloc >::TetrahedronData | ( | size_type | n | ) | [inline, explicit] |
| sofa::component::topology::TetrahedronData< T, Alloc >::TetrahedronData | ( | const sofa::helper::vector< T, Alloc > & | x | ) | [inline] |
| sofa::component::topology::TetrahedronData< T, Alloc >::TetrahedronData | ( | typename TetrahedronData< T >::const_iterator | first, | |
| typename TetrahedronData< T, Alloc >::const_iterator | last | |||
| ) | [inline] |
| sofa::component::topology::TetrahedronData< T, Alloc >::TetrahedronData | ( | void(*)(int, void *, T &, const Tetrahedron &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &) | createFunc = td_basicCreateFunc, |
|
| void * | createParam = (void*)NULL, |
|||
| void(*)(int, void *, T &) | destroyFunc = td_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 106 of file TetrahedronData.h.
| void sofa::component::topology::TetrahedronData< T, Alloc >::add | ( | unsigned int | nbTetrahedra, | |
| const sofa::helper::vector< Tetrahedron > & | tetrahedron, | |||
| 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 83 of file TetrahedronData.inl.
References sofa::component::topology::TetrahedronData< T, Alloc >::m_createFunc, and sofa::component::topology::TetrahedronData< T, Alloc >::m_createParam.
| void sofa::component::topology::TetrahedronData< 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 TetrahedronSetTopology related events, ignore others.
Definition at line 44 of file TetrahedronData.inl.
References sofa::component::topology::TetrahedraAdded::ancestorsList, sofa::component::topology::TetrahedraAdded::coefs, sofa::component::topology::TetrahedraAdded::getNbAddedTetrahedra(), sofa::core::componentmodel::topology::TETRAHEDRAADDED, sofa::core::componentmodel::topology::TETRAHEDRAREMOVED, and sofa::component::topology::TetrahedraAdded::tetrahedronArray.
| void sofa::component::topology::TetrahedronData< T, Alloc >::remove | ( | const sofa::helper::vector< unsigned int > & | index | ) | [inline, private] |
Remove the values corresponding to the Tetrahedra removed.
Definition at line 108 of file TetrahedronData.inl.
References sofa::component::topology::TetrahedronData< T, Alloc >::m_destroyFunc, sofa::component::topology::TetrahedronData< T, Alloc >::m_destroyParam, and sofa::component::topology::TetrahedronData< T, Alloc >::swap().
| void sofa::component::topology::TetrahedronData< T, Alloc >::setCreateFunction | ( | void(*)(int, void *, T &, const Tetrahedron &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &) | createFunc | ) | [inline] |
Definition at line 119 of file TetrahedronData.h.
| void sofa::component::topology::TetrahedronData< T, Alloc >::setCreateParameter | ( | void * | createParam | ) | [inline] |
Definition at line 134 of file TetrahedronData.h.
| void sofa::component::topology::TetrahedronData< T, Alloc >::setDestroyFunction | ( | void(*)(int, void *, T &) | destroyFunc | ) | [inline] |
Definition at line 124 of file TetrahedronData.h.
| void sofa::component::topology::TetrahedronData< T, Alloc >::setDestroyParameter | ( | void * | destroyParam | ) | [inline] |
Definition at line 129 of file TetrahedronData.h.
| void sofa::component::topology::TetrahedronData< T, Alloc >::swap | ( | unsigned int | i1, | |
| unsigned int | i2 | |||
| ) | [inline, private] |
Swaps values at indices i1 and i2.
Definition at line 75 of file TetrahedronData.inl.
Referenced by sofa::component::topology::TetrahedronData< T, Alloc >::remove().
void(* sofa::component::topology::TetrahedronData< T, Alloc >::m_createFunc)(int, void *, T &, const Tetrahedron &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &) [private] |
Creation function, called when adding elements.
Referenced by sofa::component::topology::TetrahedronData< T, Alloc >::add(), and sofa::component::topology::TetrahedronData< sofa::component::forcefield::TetrahedralCorotationalFEMForceField::TetrahedronInformation >::setCreateFunction().
void* sofa::component::topology::TetrahedronData< 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 TetrahedronData.
Definition at line 163 of file TetrahedronData.h.
Referenced by sofa::component::topology::TetrahedronData< T, Alloc >::add(), and sofa::component::topology::TetrahedronData< sofa::component::forcefield::TetrahedralCorotationalFEMForceField::TetrahedronInformation >::setCreateParameter().
void(* sofa::component::topology::TetrahedronData< T, Alloc >::m_destroyFunc)(int, void *, T &) [private] |
Destruction function, called when deleting elements.
Referenced by sofa::component::topology::TetrahedronData< T, Alloc >::remove(), and sofa::component::topology::TetrahedronData< sofa::component::forcefield::TetrahedralCorotationalFEMForceField::TetrahedronInformation >::setDestroyFunction().
void* sofa::component::topology::TetrahedronData< 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 TetrahedronData.
Definition at line 169 of file TetrahedronData.h.
Referenced by sofa::component::topology::TetrahedronData< T, Alloc >::remove(), and sofa::component::topology::TetrahedronData< sofa::component::forcefield::TetrahedralCorotationalFEMForceField::TetrahedronInformation >::setDestroyParameter().
1.5.7.1