SOFA API  1df67014
Open source framework for multi-physics simuation
sofa::component::collision::geometry::TSphere< TDataTypes > Class Template Reference

#include <SphereModel.h>

Inheritance diagram for sofa::component::collision::geometry::TSphere< TDataTypes >:

Public Member Functions

 TSphere (ParentModel *model, Index index)
 
 TSphere (const core::CollisionElementIterator &i)
 
const Coordcenter () const
 
const TDataTypes::Coord & rigidCenter () const
 
const Coordp () const
 
const CoordpFree () const
 
const Coordv () const
 
bool hasFreePosition () const
 Return true if the element stores a free position vector. More...
 
Real r () const
 
sofa::type::Vec3 getContactPointByNormal (const sofa::type::Vec3 &contactNormal)
 
sofa::type::Vec3 getContactPointWithSurfacePoint (const sofa::type::Vec3 &surfacePoint)
 
SOFA_COMPONENT_COLLISION_GEOMETRY_API Vec3 getContactPointByNormal (const Vec3 &)
 
SOFA_COMPONENT_COLLISION_GEOMETRY_API Vec3 getContactPointWithSurfacePoint (const Vec3 &)
 
SOFA_COMPONENT_COLLISION_GEOMETRY_API sofa::type::Vec3 getContactPointByNormal (const sofa::type::Vec3 &)
 
SOFA_COMPONENT_COLLISION_GEOMETRY_API sofa::type::Vec3 getContactPointWithSurfacePoint (const sofa::type::Vec3 &)
 
- Public Member Functions inherited from sofa::core::TCollisionElementIterator< SphereCollisionModel< TDataTypes > >
 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
 
bool operator== (const TCollisionElementIterator< Model2 > &i) const
 
bool operator!= (const TCollisionElementIterator< Model2 > &i) const
 
TCollisionElementIteratoroperator+= (int n)
 
TCollisionElementIterator operator+ (int n) 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 (const TCollisionElementIterator< Model > &elem) const
 
SReal getProximity () 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...
 
BaseCollisionElementIteratoroperator++ ()
 Prefix increment this iterator to reference the next element. More...
 
BaseCollisionElementIterator operator++ (int)
 Postfix increment this iterator to reference the next element. More...
 
BaseCollisionElementIteratoroperator+= (int n)
 
BaseCollisionElementIterator operator+ (int n) const
 
Index 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< SphereCollisionModel< TDataTypes > >
Modelmodel
 CollisionModel containing the referenced element. More...
 
- 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...
 

Constructor details

◆ TSphere() [1/2]

template<class DataTypes >
sofa::component::collision::geometry::TSphere< DataTypes >::TSphere ( ParentModel model,
Index  index 
)
inline

◆ TSphere() [2/2]

template<class DataTypes >
sofa::component::collision::geometry::TSphere< DataTypes >::TSphere ( const core::CollisionElementIterator i)
inlineexplicit

Function details

◆ center()

template<class DataTypes >
const TSphere< DataTypes >::Coord & sofa::component::collision::geometry::TSphere< DataTypes >::center
inline

◆ getContactPointByNormal() [1/3]

SOFA_COMPONENT_COLLISION_GEOMETRY_API sofa::type::Vec3 sofa::component::collision::geometry::TSphere< defaulttype::Vec3Types >::getContactPointByNormal ( const sofa::type::Vec3 )

◆ getContactPointByNormal() [2/3]

template<class TDataTypes >
sofa::type::Vec3 sofa::component::collision::geometry::TSphere< TDataTypes >::getContactPointByNormal ( const sofa::type::Vec3 contactNormal)
inline

◆ getContactPointByNormal() [3/3]

SOFA_COMPONENT_COLLISION_GEOMETRY_API Vec3 sofa::component::collision::geometry::TSphere< defaulttype::Vec3Types >::getContactPointByNormal ( const Vec3 )

◆ getContactPointWithSurfacePoint() [1/3]

SOFA_COMPONENT_COLLISION_GEOMETRY_API sofa::type::Vec3 sofa::component::collision::geometry::TSphere< defaulttype::Vec3Types >::getContactPointWithSurfacePoint ( const sofa::type::Vec3 )

◆ getContactPointWithSurfacePoint() [2/3]

template<class TDataTypes >
sofa::type::Vec3 sofa::component::collision::geometry::TSphere< TDataTypes >::getContactPointWithSurfacePoint ( const sofa::type::Vec3 surfacePoint)
inline

◆ getContactPointWithSurfacePoint() [3/3]

SOFA_COMPONENT_COLLISION_GEOMETRY_API Vec3 sofa::component::collision::geometry::TSphere< defaulttype::Vec3Types >::getContactPointWithSurfacePoint ( const Vec3 )

◆ hasFreePosition()

template<class DataTypes >
bool sofa::component::collision::geometry::TSphere< DataTypes >::hasFreePosition
inline

Return true if the element stores a free position vector.

◆ p()

template<class DataTypes >
const TSphere< DataTypes >::Coord & sofa::component::collision::geometry::TSphere< DataTypes >::p
inline

◆ pFree()

template<class DataTypes >
const TSphere< DataTypes >::Coord & sofa::component::collision::geometry::TSphere< DataTypes >::pFree
inline

◆ r()

template<class DataTypes >
DataTypes::Real sofa::component::collision::geometry::TSphere< DataTypes >::r
inline

◆ rigidCenter()

template<class DataTypes >
const DataTypes::Coord & sofa::component::collision::geometry::TSphere< DataTypes >::rigidCenter
inline

◆ v()

template<class DataTypes >
const TSphere< DataTypes >::Coord & sofa::component::collision::geometry::TSphere< DataTypes >::v
inline