#include <QuadData.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 | |
| QuadData (size_type n, const T &value) | |
| Constructor. | |
| QuadData (int n, const T &value) | |
| Constructor. | |
| QuadData (long n, const T &value) | |
| Constructor. | |
| QuadData (size_type n) | |
| Constructor. | |
| QuadData (const sofa::helper::vector< T, Alloc > &x) | |
| Constructor. | |
| QuadData (typename QuadData< T >::const_iterator first, typename QuadData< T, Alloc >::const_iterator last) | |
| Constructor. | |
| QuadData (void(*createFunc)(int, void *, T &, const Quad &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &)=trd_basicCreateFunc, void *createParam=(void *) NULL, void(*destroyFunc)(int, void *, T &)=qd_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 QuadSetTopology related events, ignore others. | |
| void | setCreateFunction (void(*createFunc)(int, void *, T &, const Quad &, 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 nbQuads, const sofa::helper::vector< Quad > &quad, 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 Quads removed. | |
Private Attributes | |
| void(* | m_createFunc )(int, void *, T &, const Quad &, 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 |
| Creation function, called when adding hexahedra elements. | |
| 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: Quads added, removed, fused, renumbered).
Definition at line 71 of file QuadData.h.
| typedef sofa::helper::vector<T,Alloc>::const_reference sofa::component::topology::QuadData< T, Alloc >::const_reference |
const reference to a value (read only)
Reimplemented from sofa::helper::vector< T, Alloc >.
Definition at line 79 of file QuadData.h.
| typedef sofa::helper::vector<T,Alloc>::reference sofa::component::topology::QuadData< T, Alloc >::reference |
reference to a value (read-write)
Reimplemented from sofa::helper::vector< T, Alloc >.
Definition at line 77 of file QuadData.h.
| typedef sofa::helper::vector<T,Alloc>::size_type sofa::component::topology::QuadData< T, Alloc >::size_type |
size_type
Reimplemented from sofa::helper::vector< T, Alloc >.
Definition at line 75 of file QuadData.h.
| sofa::component::topology::QuadData< T, Alloc >::QuadData | ( | size_type | n, | |
| const T & | value | |||
| ) | [inline] |
| sofa::component::topology::QuadData< T, Alloc >::QuadData | ( | int | n, | |
| const T & | value | |||
| ) | [inline] |
| sofa::component::topology::QuadData< T, Alloc >::QuadData | ( | long | n, | |
| const T & | value | |||
| ) | [inline] |
| sofa::component::topology::QuadData< T, Alloc >::QuadData | ( | size_type | n | ) | [inline, explicit] |
| sofa::component::topology::QuadData< T, Alloc >::QuadData | ( | const sofa::helper::vector< T, Alloc > & | x | ) | [inline] |
| sofa::component::topology::QuadData< T, Alloc >::QuadData | ( | void(*)(int, void *, T &, const Quad &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &) | createFunc = trd_basicCreateFunc, |
|
| void * | createParam = (void*)NULL, |
|||
| void(*)(int, void *, T &) | destroyFunc = qd_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 105 of file QuadData.h.
| void sofa::component::topology::QuadData< T, Alloc >::add | ( | unsigned int | nbQuads, | |
| const sofa::helper::vector< Quad > & | quad, | |||
| 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 106 of file QuadData.inl.
References sofa::component::topology::QuadData< T, Alloc >::m_createFunc, and sofa::component::topology::QuadData< T, Alloc >::m_createParam.
| void sofa::component::topology::QuadData< 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 QuadSetTopology related events, ignore others.
Definition at line 45 of file QuadData.inl.
References sofa::component::topology::QuadsAdded::ancestorsList, sofa::component::topology::QuadsAdded::coefs, sofa::component::topology::QuadsAdded::getNbAddedQuads(), sofa::component::topology::QuadsAdded::quadArray, sofa::core::componentmodel::topology::QUADSADDED, and sofa::core::componentmodel::topology::QUADSREMOVED.
| void sofa::component::topology::QuadData< T, Alloc >::remove | ( | const sofa::helper::vector< unsigned int > & | index | ) | [inline, private] |
Remove the values corresponding to the Quads removed.
Definition at line 130 of file QuadData.inl.
References sofa::component::topology::QuadData< T, Alloc >::m_destroyFunc, sofa::component::topology::QuadData< T, Alloc >::m_destroyParam, and sofa::component::topology::QuadData< T, Alloc >::swap().
| void sofa::component::topology::QuadData< T, Alloc >::setCreateFunction | ( | void(*)(int, void *, T &, const Quad &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &) | createFunc | ) | [inline] |
Definition at line 120 of file QuadData.h.
References sofa::component::topology::QuadData< T, Alloc >::m_createFunc.
| void sofa::component::topology::QuadData< T, Alloc >::setCreateParameter | ( | void * | createParam | ) | [inline] |
Definition at line 135 of file QuadData.h.
References sofa::component::topology::QuadData< T, Alloc >::m_createParam.
| void sofa::component::topology::QuadData< T, Alloc >::setDestroyFunction | ( | void(*)(int, void *, T &) | destroyFunc | ) | [inline] |
Definition at line 125 of file QuadData.h.
References sofa::component::topology::QuadData< T, Alloc >::m_destroyFunc.
| void sofa::component::topology::QuadData< T, Alloc >::setDestroyParameter | ( | void * | destroyParam | ) | [inline] |
Definition at line 130 of file QuadData.h.
References sofa::component::topology::QuadData< T, Alloc >::m_destroyParam.
| void sofa::component::topology::QuadData< T, Alloc >::swap | ( | unsigned int | i1, | |
| unsigned int | i2 | |||
| ) | [inline, private] |
Swaps values at indices i1 and i2.
Definition at line 98 of file QuadData.inl.
Referenced by sofa::component::topology::QuadData< T, Alloc >::remove().
void(* sofa::component::topology::QuadData< T, Alloc >::m_createFunc)(int, void *, T &, const Quad &, const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< double > &) [private] |
Creation function, called when adding elements.
Referenced by sofa::component::topology::QuadData< T, Alloc >::add(), and sofa::component::topology::QuadData< T, Alloc >::setCreateFunction().
void* sofa::component::topology::QuadData< T, Alloc >::m_createParam [private] |
Creation function, called when adding hexahedra elements.
Destruction function, called when removing hexahedra elements. Parameter to be passed to creation function.
Warning : construction and destruction of this object is not of the responsibility of QuadData.
Definition at line 185 of file QuadData.h.
Referenced by sofa::component::topology::QuadData< T, Alloc >::add(), and sofa::component::topology::QuadData< T, Alloc >::setCreateParameter().
void(* sofa::component::topology::QuadData< T, Alloc >::m_destroyFunc)(int, void *, T &) [private] |
Destruction function, called when deleting elements.
Referenced by sofa::component::topology::QuadData< T, Alloc >::remove(), and sofa::component::topology::QuadData< T, Alloc >::setDestroyFunction().
void* sofa::component::topology::QuadData< 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 QuadData.
Definition at line 191 of file QuadData.h.
Referenced by sofa::component::topology::QuadData< T, Alloc >::remove(), and sofa::component::topology::QuadData< T, Alloc >::setDestroyParameter().
1.5.7.1