#include <CollisionElement.h>
Reference to an collision element defined by its index inside a given collision model. More...

Reference to an collision element defined by its index inside a given collision model.
A CollisionElementIterator is only a temporary iterator and must not contain any data. It only contains inline non-virtual methods calling the appropriate methods in the parent model object. This class is a template in order to store reference to a specific type of element (such as a Cube in a CubeModel).
| Public Attributes | |
| Model * | model | 
| CollisionModel containing the referenced element.  More... | |
| Public Member Functions | |
| TCollisionElementIterator (Model *model=nullptr, Index index=0) | |
| TCollisionElementIterator (Model *model, Index index, VIterator it, VIterator itend) | |
| TCollisionElementIterator (Model *model, VIterator it, VIterator itend) | |
| bool | isActive (core::CollisionModel *cm=nullptr) const | 
| Iterator Interface | |
| template<class Model2 > | |
| bool | operator== (const TCollisionElementIterator< Model2 > &i) const | 
| template<class Model2 > | |
| bool | operator!= (const TCollisionElementIterator< Model2 > &i) const | 
| TCollisionElementIterator & | operator+= (int n) | 
| TCollisionElementIterator | operator+ (int n) const | 
| bool | valid () const | 
| Model * | getCollisionModel () const | 
| Return the CollisionModel containing the referenced element.  More... | |
| Wrapper methods to access data and methods inside the CollisionModel. | |
| std::pair< CollisionElementIterator, CollisionElementIterator > | getInternalChildren () const | 
| std::pair< CollisionElementIterator, CollisionElementIterator > | getExternalChildren () const | 
| bool | isLeaf () const | 
| bool | canCollideWith (const TCollisionElementIterator< Model > &elem) const | 
| SReal | getContactDistance () const | 
| Distance to the actual (visual) surface.  More... | |
| SReal | getContactStiffness () const | 
| Contact stiffness.  More... | |
| SReal | getContactFriction () const | 
| Contact friction (damping) coefficient.  More... | |
| void | draw (const core::visual::VisualParams *vparams) | 
|  Public Member Functions inherited from sofa::core::BaseCollisionElementIterator | |
| BaseCollisionElementIterator (Index index=0) | |
| BaseCollisionElementIterator (Index index, VIterator it, VIterator itend) | |
| BaseCollisionElementIterator (VIterator it, VIterator itend) | |
| void | next () | 
| Increment this iterator to reference the next element.  More... | |
| BaseCollisionElementIterator & | operator++ () | 
| Prefix increment this iterator to reference the next element.  More... | |
| BaseCollisionElementIterator | operator++ (int) | 
| Postfix increment this iterator to reference the next element.  More... | |
| BaseCollisionElementIterator & | operator+= (int n) | 
| BaseCollisionElementIterator | operator+ (int n) const | 
| Index | getIndex () const | 
| const VIterator & | getVIterator () const | 
| Return the current iterator in the vector of indices, in case such a vector is currently used.  More... | |
| const VIterator & | getVIteratorEnd () const | 
| Return the end iterator in the vector of indices, in case such a vector is currently used.  More... | |
| Additional Inherited Members | |
|  Protected Attributes inherited from sofa::core::BaseCollisionElementIterator | |
| Index | index | 
| index of the referenced element inside the CollisionModel.  More... | |
| VIterator | it | 
| current position in a vector of indices, in case this iterator traverse a non-contiguous set of indices  More... | |
| VIterator | itend | 
| end position in a vector of indices, in case this iterator traverse a non-contiguous set of indices  More... | |
|  Static Protected Attributes inherited from sofa::core::BaseCollisionElementIterator | |
| static std::vector< int > SOFA_CORE_API | emptyVector | 
| empty vector to be able to initialize the iterator to an empty pair  More... | |
| Model* sofa::core::TCollisionElementIterator< TModel >::model | 
CollisionModel containing the referenced element.
| 
 | inline | 
Constructor. In most cases it will be used by the CollisionModel to create interators to its elements (such as in the begin() and end() methods).
| 
 | inline | 
Constructor. This constructor should be used in case a vector of indices is used.
| 
 | inline | 
Constructor. This constructor should be used in case a vector of indices is used.
| 
 | inline | 
Test if this element can collide with another element.
| 
 | inline | 
Render this element.
| 
 | inline | 
Return the CollisionModel containing the referenced element.
| 
 | inline | 
Distance to the actual (visual) surface.
| 
 | inline | 
Contact friction (damping) coefficient.
| 
 | inline | 
Contact stiffness.
| std::pair< CollisionElementIterator, CollisionElementIterator > sofa::core::TCollisionElementIterator< Model >::getExternalChildren | 
Return the list (as a pair of iterators) of external children of this element.
| std::pair< CollisionElementIterator, CollisionElementIterator > sofa::core::TCollisionElementIterator< Model >::getInternalChildren | 
Return the list (as a pair of iterators) of internal children of this element.
| 
 | inline | 
| 
 | inline | 
Test if this element is a leaf.
| 
 | inline | 
Compare two iterators. Note that even it the iterators are of different types, they can point to the same element.
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
Compare two iterators. Note that even it the iterators are of different types, they can point to the same element.
| 
 | inline | 
Test if this iterator is initialized with a valid CollisionModel. Note that it does not test if the referenced element inside the CollisionModel is valid.