sofa::component::collision::RayModel Class Reference

#include <RayModel.h>

Inheritance diagram for sofa::component::collision::RayModel:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::collision::RayModel:

Collaboration graph
[legend]

Public Types

typedef Vec3Types InDataTypes
typedef Vec3Types DataTypes
typedef Ray Element

Public Member Functions

 RayModel (SReal defaultLength=1)
int addRay (const Vector3 &origin, const Vector3 &direction, SReal length)
int getNbRay () const
void setNbRay (int n)
Ray getRay (int index)
virtual void addContact (BaseRayContact *contact)
virtual void removeContact (BaseRayContact *contact)
virtual void resize (int size)
 Set the number of elements.
virtual void computeBoundingTree (int maxDepth)
 Create or update the bounding volume hierarchy.
void draw (int index)
 Render an collision element.
void applyTranslation (const double dx, const double dy, const double dz)
 Translate the current state.
void draw ()
 Render the whole collision model.

Protected Attributes

sofa::helper::vector< SReal > length
Data< SReal > defaultLength
std::set< BaseRayContact * > contacts

Friends

class Ray

Detailed Description

Definition at line 65 of file RayModel.h.


Member Typedef Documentation

Reimplemented from sofa::core::componentmodel::behavior::MechanicalState< DataTypes >.

Definition at line 75 of file RayModel.h.

Definition at line 76 of file RayModel.h.

Definition at line 74 of file RayModel.h.


Constructor & Destructor Documentation

sofa::component::collision::RayModel::RayModel ( SReal  defaultLength = 1  ) 


Member Function Documentation

virtual void sofa::component::collision::RayModel::addContact ( BaseRayContact *  contact  )  [inline, virtual]

Definition at line 89 of file RayModel.h.

References contacts.

int sofa::component::collision::RayModel::addRay ( const Vector3 &  origin,
const Vector3 &  direction,
SReal  length 
)

void sofa::component::collision::RayModel::applyTranslation ( const double  dx,
const double  dy,
const double  dz 
) [virtual]

Translate the current state.

Reimplemented from sofa::component::MechanicalObject< DataTypes >.

Definition at line 145 of file RayModel.cpp.

References getNbRay(), getRay(), and sofa::component::collision::Ray::origin().

void sofa::component::collision::RayModel::computeBoundingTree ( int  maxDepth  )  [virtual]

void sofa::component::collision::RayModel::draw (  )  [virtual]

void sofa::component::collision::RayModel::draw ( int   )  [virtual]

int sofa::component::collision::RayModel::getNbRay (  )  const [inline]

Ray sofa::component::collision::RayModel::getRay ( int  index  )  [inline]

virtual void sofa::component::collision::RayModel::removeContact ( BaseRayContact *  contact  )  [inline, virtual]

Definition at line 91 of file RayModel.h.

References contacts.

Referenced by sofa::component::collision::BaseRayContact::~BaseRayContact().

void sofa::component::collision::RayModel::resize ( int  s  )  [virtual]

Set the number of elements.

Reimplemented from sofa::core::CollisionModel.

Definition at line 57 of file RayModel.cpp.

References defaultLength, and length.

Referenced by setNbRay(), and sofa::component::collision::RayPickInteractor::updatePosition().

void sofa::component::collision::RayModel::setNbRay ( int  n  )  [inline]

Definition at line 85 of file RayModel.h.

References resize().

Referenced by sofa::component::collision::RayPickInteractor::updatePosition().


Friends And Related Function Documentation

friend class Ray [friend]

Definition at line 77 of file RayModel.h.

Referenced by getRay().


Field Documentation

Definition at line 70 of file RayModel.h.

Referenced by resize().

Definition at line 68 of file RayModel.h.

Referenced by resize().


The documentation for this class was generated from the following files:

Generated on Sun Nov 23 04:17:33 2008 for Sofa by  doxygen 1.5.7.1