SOFA API  014b24ea
Open source framework for multi-physics simuation
sofa::component::collision::TCapsule< TDataTypes > Class Template Reference

#include <RigidCapsuleModel.h>

Inheritance diagram for sofa::component::collision::TCapsule< TDataTypes >:

Detailed Description

template<class TDataTypes>
class sofa::component::collision::TCapsule< TDataTypes >

A capsule can be viewed as a segment with a radius, here the segment is defined by its apexes.

Public Member Functions

 TCapsule (ParentModel *model, int index)
 
 TCapsule (const core::CollisionElementIterator &i)
 
Coord point1 () const
 
Coord point2 () const
 
Coord axis () const
 
Real radius () const
 
Coord v () const
 
bool shareSameVertex (const TCapsule< TDataTypes > &other) const
 
- Public Member Functions inherited from sofa::core::TCollisionElementIterator< CapsuleCollisionModel< TDataTypes > >
 TCollisionElementIterator (Model *model=nullptr, int index=0)
 
 TCollisionElementIterator (Model *model, int index, VIterator it, VIterator itend)
 
 TCollisionElementIterator (Model *model, VIterator it, VIterator itend)
 
bool isActive (core::CollisionModel *cm=nullptr) const
 
bool operator== (const TCollisionElementIterator< Model2 > &i) const
 
bool operator!= (const TCollisionElementIterator< Model2 > &i) const
 
bool valid () const
 
ModelgetCollisionModel () const
 Return the CollisionModel containing the referenced element. More...
 
std::pair< CollisionElementIterator, CollisionElementIteratorgetInternalChildren () const
 
std::pair< CollisionElementIterator, CollisionElementIteratorgetExternalChildren () const
 
bool isLeaf () const
 
bool canCollideWith (TCollisionElementIterator< Model > &elem)
 
double getProximity ()
 Distance to the actual (visual) surface. More...
 
double getContactStiffness ()
 Contact stiffness. More...
 
double getContactFriction ()
 Contact friction (damping) coefficient. More...
 
void draw (const core::visual::VisualParams *vparams)
 
- Public Member Functions inherited from sofa::core::BaseCollisionElementIterator
 BaseCollisionElementIterator (int index=0)
 
 BaseCollisionElementIterator (int index, VIterator it, VIterator itend)
 
 BaseCollisionElementIterator (VIterator it, VIterator itend)
 
void next ()
 Increment this iterator to reference the next element. More...
 
void operator++ ()
 Increment this iterator to reference the next element. More...
 
void operator++ (int)
 Increment this iterator to reference the next element. More...
 
int getIndex () const
 
const VIteratorgetVIterator () const
 Return the current iterator in the vector of indices, in case such a vector is currently used. More...
 
const VIteratorgetVIteratorEnd () const
 Return the end iterator in the vector of indices, in case such a vector is currently used. More...
 

Additional Inherited Members

- Public Attributes inherited from sofa::core::TCollisionElementIterator< CapsuleCollisionModel< TDataTypes > >
Modelmodel
 CollisionModel containing the referenced element. More...
 
- Protected Attributes inherited from sofa::core::BaseCollisionElementIterator
int 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...
 

Constructor details

template<class DataTypes >
sofa::component::collision::TCapsule< DataTypes >::TCapsule ( ParentModel model,
int  index 
)
inline
template<class DataTypes >
sofa::component::collision::TCapsule< DataTypes >::TCapsule ( const core::CollisionElementIterator i)
inlineexplicit

Function details

template<class DataTypes >
TCapsule< DataTypes >::Coord sofa::component::collision::TCapsule< DataTypes >::axis ( ) const
template<class DataTypes >
TCapsule< DataTypes >::Coord sofa::component::collision::TCapsule< DataTypes >::point1 ( ) const

Gives one apex of the capsule segment.

template<class DataTypes >
TCapsule< DataTypes >::Coord sofa::component::collision::TCapsule< DataTypes >::point2 ( ) const

Gives other apex of the capsule segment.

template<class DataTypes >
TCapsule< DataTypes >::Real sofa::component::collision::TCapsule< DataTypes >::radius ( ) const
template<class DataTypes>
bool sofa::component::collision::TCapsule< DataTypes >::shareSameVertex ( const TCapsule< DataTypes > &  other) const
template<class DataTypes >
TCapsule< DataTypes >::Coord sofa::component::collision::TCapsule< DataTypes >::v ( ) const