sofa::component::collision::SingleSphere Class Reference

Define a "glorious" pointer to an element (sphere) in the SphereTreeModel. More...

#include <SphereTreeModel.h>

Inheritance diagram for sofa::component::collision::SingleSphere:

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

Collaboration graph
[legend]

Public Types

typedef Vec3Types DataTypes
typedef DataTypes::Real Real
typedef DataTypes::Coord Coord
typedef DataTypes::Deriv Deriv

Public Member Functions

 SingleSphere (SphereTreeModel *model, int index)
 Constructor.
 SingleSphere (core::CollisionElementIterator &i)
 Constructor.
const Vector3 & center () const
 Returns center of the sphere.
void setCenter (double x, double y, double z)
 Set center of sphere.
const Vector3 & v () const
double r () const
 Returns the radius of the sphere "i".

Detailed Description

Define a "glorious" pointer to an element (sphere) in the SphereTreeModel.

It should not contain any data information. We are trying not to store virtual classes for each element. In this way we avoid overheading

Definition at line 67 of file SphereTreeModel.h.


Member Typedef Documentation

Definition at line 72 of file SphereTreeModel.h.

Definition at line 70 of file SphereTreeModel.h.

Definition at line 73 of file SphereTreeModel.h.

Definition at line 71 of file SphereTreeModel.h.


Constructor & Destructor Documentation

sofa::component::collision::SingleSphere::SingleSphere ( SphereTreeModel *  model,
int  index 
) [inline]

Constructor.

Inline definitions of class SingleSphere.

Constructor

Definition at line 176 of file SphereTreeModel.h.

sofa::component::collision::SingleSphere::SingleSphere ( core::CollisionElementIterator &  i  )  [inline, explicit]

Constructor.

Definition at line 181 of file SphereTreeModel.h.


Member Function Documentation

const Vector3 & sofa::component::collision::SingleSphere::center (  )  const [inline]

Returns center of the sphere.

It points (according to the index "i") to the DOF's of the collision model i.e. the centers of the spheres

Definition at line 187 of file SphereTreeModel.h.

References sofa::core::BaseCollisionElementIterator::index, and sofa::core::TCollisionElementIterator< TModel >::model.

double sofa::component::collision::SingleSphere::r (  )  const [inline]

void sofa::component::collision::SingleSphere::setCenter ( double  x,
double  y,
double  z 
) [inline]

Set center of sphere.

It modifies the center of the sphere with index "i" i.e. it modifies one element of the DOF's of the collision model

Definition at line 197 of file SphereTreeModel.h.

References sofa::core::BaseCollisionElementIterator::index, and sofa::core::TCollisionElementIterator< TModel >::model.

Referenced by sofa::component::collision::SphereTreeModel::loadSphereTree().

const Vector3 & sofa::component::collision::SingleSphere::v (  )  const [inline]


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

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