SOFA API  6a688117
Open source framework for multi-physics simuation
sofa::component::collision::Ray Class Reference

#include <RayModel.h>

Inheritance diagram for sofa::component::collision::Ray:

Public Member Functions

 Ray (RayCollisionModel *model, int index)
 
 Ray (const core::CollisionElementIterator &i)
 
const defaulttype::Vector3 & origin () const
 
const defaulttype::Vector3 & direction () const
 
SReal l () const
 
void setOrigin (const defaulttype::Vector3 &newOrigin)
 
void setDirection (const defaulttype::Vector3 &newDirection)
 
void setL (SReal newL)
 
- Public Member Functions inherited from sofa::core::TCollisionElementIterator< RayCollisionModel >
 TCollisionElementIterator (Model *model=nullptr, index_type index=0)
 
 TCollisionElementIterator (Model *model, index_type 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 (index_type index=0)
 
 BaseCollisionElementIterator (index_type 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...
 
index_type 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< RayCollisionModel >
Modelmodel
 CollisionModel containing the referenced element. More...
 
- Protected Attributes inherited from sofa::core::BaseCollisionElementIterator
index_type 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

sofa::component::collision::Ray::Ray ( RayCollisionModel model,
int  index 
)
inline
sofa::component::collision::Ray::Ray ( const core::CollisionElementIterator i)
inlineexplicit

Function details

const defaulttype::Vector3 & sofa::component::collision::Ray::direction ( ) const
inline
defaulttype::Vector3::value_type sofa::component::collision::Ray::l ( ) const
inline
const defaulttype::Vector3 & sofa::component::collision::Ray::origin ( ) const
inline
void sofa::component::collision::Ray::setDirection ( const defaulttype::Vector3 &  newDirection)
inline
void sofa::component::collision::Ray::setL ( SReal  newL)
inline
void sofa::component::collision::Ray::setOrigin ( const defaulttype::Vector3 &  newOrigin)
inline