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

#include <TriangleModel.h>

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

Public Member Functions

 TTriangle (ParentModel *model, Index index)
 
 TTriangle ()
 
 TTriangle (const core::CollisionElementIterator &i)
 
 TTriangle (ParentModel *model, Index index, helper::ReadAccessor< typename DataTypes::VecCoord > &)
 
const Coordp1 () const
 
const Coordp2 () const
 
const Coordp3 () const
 
const Coordp (Index i) const
 
Index p1Index () const
 
Index p2Index () const
 
Index p3Index () const
 
const Coordp1Free () const
 
const Coordp2Free () const
 
const Coordp3Free () const
 
const Coordoperator[] (Index i) const
 
const Derivv1 () const
 
const Derivv2 () const
 
const Derivv3 () const
 
const Derivv (Index i) const
 
const Derivn () const
 
Derivn ()
 
bool hasFreePosition () const
 Return true if the element stores a free position vector. More...
 
int flags () const
 
TTriangleshape ()
 
const TTriangleshape () const
 
Coord interpX (type::Vec< 2, Real > bary) const
 
- Public Member Functions inherited from sofa::core::TCollisionElementIterator< TriangleCollisionModel< 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< TriangleCollisionModel< 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

◆ TTriangle() [1/4]

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

◆ TTriangle() [2/4]

template<class TDataTypes >
sofa::component::collision::geometry::TTriangle< TDataTypes >::TTriangle ( )
inline

◆ TTriangle() [3/4]

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

◆ TTriangle() [4/4]

template<class DataTypes >
sofa::component::collision::geometry::TTriangle< DataTypes >::TTriangle ( ParentModel model,
Index  index,
helper::ReadAccessor< typename DataTypes::VecCoord > &  x 
)
inline

Function details

◆ flags()

template<class DataTypes >
int sofa::component::collision::geometry::TTriangle< DataTypes >::flags
inline

◆ hasFreePosition()

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

Return true if the element stores a free position vector.

◆ interpX()

template<class TDataTypes >
Coord sofa::component::collision::geometry::TTriangle< TDataTypes >::interpX ( type::Vec< 2, Real bary) const
inline

◆ n() [1/2]

template<class DataTypes >
DataTypes::Deriv & sofa::component::collision::geometry::TTriangle< DataTypes >::n
inline

◆ n() [2/2]

template<class DataTypes >
const DataTypes::Deriv & sofa::component::collision::geometry::TTriangle< DataTypes >::n
inline

◆ operator[]()

template<class DataTypes >
const DataTypes::Coord & sofa::component::collision::geometry::TTriangle< DataTypes >::operator[] ( Index  i) const
inline

◆ p()

template<class DataTypes >
const DataTypes::Coord & sofa::component::collision::geometry::TTriangle< DataTypes >::p ( Index  i) const
inline

◆ p1()

template<class DataTypes >
const DataTypes::Coord & sofa::component::collision::geometry::TTriangle< DataTypes >::p1
inline

◆ p1Free()

template<class DataTypes >
const DataTypes::Coord & sofa::component::collision::geometry::TTriangle< DataTypes >::p1Free
inline

◆ p1Index()

template<class DataTypes >
TTriangle< DataTypes >::Index sofa::component::collision::geometry::TTriangle< DataTypes >::p1Index
inline

◆ p2()

template<class DataTypes >
const DataTypes::Coord & sofa::component::collision::geometry::TTriangle< DataTypes >::p2
inline

◆ p2Free()

template<class DataTypes >
const DataTypes::Coord & sofa::component::collision::geometry::TTriangle< DataTypes >::p2Free
inline

◆ p2Index()

template<class DataTypes >
TTriangle< DataTypes >::Index sofa::component::collision::geometry::TTriangle< DataTypes >::p2Index
inline

◆ p3()

template<class DataTypes >
const DataTypes::Coord & sofa::component::collision::geometry::TTriangle< DataTypes >::p3
inline

◆ p3Free()

template<class DataTypes >
const DataTypes::Coord & sofa::component::collision::geometry::TTriangle< DataTypes >::p3Free
inline

◆ p3Index()

template<class DataTypes >
TTriangle< DataTypes >::Index sofa::component::collision::geometry::TTriangle< DataTypes >::p3Index
inline

◆ shape() [1/2]

template<class TDataTypes >
TTriangle& sofa::component::collision::geometry::TTriangle< TDataTypes >::shape ( )
inline

◆ shape() [2/2]

template<class TDataTypes >
const TTriangle& sofa::component::collision::geometry::TTriangle< TDataTypes >::shape ( ) const
inline

◆ v()

template<class DataTypes >
const DataTypes::Deriv & sofa::component::collision::geometry::TTriangle< DataTypes >::v ( Index  i) const
inline

◆ v1()

template<class DataTypes >
const DataTypes::Deriv & sofa::component::collision::geometry::TTriangle< DataTypes >::v1
inline

◆ v2()

template<class DataTypes >
const DataTypes::Deriv & sofa::component::collision::geometry::TTriangle< DataTypes >::v2
inline

◆ v3()

template<class DataTypes >
const DataTypes::Deriv & sofa::component::collision::geometry::TTriangle< DataTypes >::v3
inline