bodies::Sphere Class Reference

Definition of a sphere. More...

#include <bodies.h>

Inheritance diagram for bodies::Sphere:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void computeBoundingCylinder (BoundingCylinder &cylinder) const
 Compute the bounding cylinder for the body, in its current pose. Scaling and padding are accounted for.
virtual void computeBoundingSphere (BoundingSphere &sphere) const
 Compute the bounding radius for the body, in its current pose. Scaling and padding are accounted for.
virtual double computeVolume (void) const
 Compute the volume of the body. This method includes changes induced by scaling and padding.
virtual bool containsPoint (const btVector3 &p, bool verbose=false) const
 Check is a point is inside the body.
virtual bool intersectsRay (const btVector3 &origin, const btVector3 &dir, std::vector< btVector3 > *intersections=NULL, unsigned int count=0) const
 Check is a ray intersects the body, and find the set of intersections, in order, along the ray. A maximum number of intersections can be specified as well. If that number is 0, all intersections are returned.
 Sphere (const shapes::Shape *shape)
 Sphere (void)
virtual ~Sphere (void)

Protected Member Functions

virtual void updateInternalData (void)
virtual void useDimensions (const shapes::Shape *shape)

Protected Attributes

btVector3 m_center
double m_radius
double m_radius2
double m_radiusU

Detailed Description

Definition of a sphere.

Definition at line 171 of file bodies.h.


Constructor & Destructor Documentation

bodies::Sphere::Sphere ( void   )  [inline]

Definition at line 174 of file bodies.h.

bodies::Sphere::Sphere ( const shapes::Shape shape  )  [inline]

Definition at line 179 of file bodies.h.

virtual bodies::Sphere::~Sphere ( void   )  [inline, virtual]

Definition at line 185 of file bodies.h.


Member Function Documentation

void bodies::Sphere::computeBoundingCylinder ( BoundingCylinder cylinder  )  const [virtual]

Compute the bounding cylinder for the body, in its current pose. Scaling and padding are accounted for.

Implements bodies::Body.

Definition at line 168 of file bodies.cpp.

void bodies::Sphere::computeBoundingSphere ( BoundingSphere sphere  )  const [virtual]

Compute the bounding radius for the body, in its current pose. Scaling and padding are accounted for.

Implements bodies::Body.

Definition at line 162 of file bodies.cpp.

double bodies::Sphere::computeVolume ( void   )  const [virtual]

Compute the volume of the body. This method includes changes induced by scaling and padding.

Implements bodies::Body.

Definition at line 157 of file bodies.cpp.

bool bodies::Sphere::containsPoint ( const btVector3 &  p,
bool  verbose = false 
) const [virtual]

Check is a point is inside the body.

Implements bodies::Body.

Definition at line 140 of file bodies.cpp.

bool bodies::Sphere::intersectsRay ( const btVector3 &  origin,
const btVector3 &  dir,
std::vector< btVector3 > *  intersections = NULL,
unsigned int  count = 0 
) const [virtual]

Check is a ray intersects the body, and find the set of intersections, in order, along the ray. A maximum number of intersections can be specified as well. If that number is 0, all intersections are returned.

Implements bodies::Body.

Definition at line 176 of file bodies.cpp.

void bodies::Sphere::updateInternalData ( void   )  [protected, virtual]

Implements bodies::Body.

Definition at line 150 of file bodies.cpp.

void bodies::Sphere::useDimensions ( const shapes::Shape shape  )  [protected, virtual]

Implements bodies::Body.

Definition at line 145 of file bodies.cpp.


Member Data Documentation

btVector3 bodies::Sphere::m_center [protected]

Definition at line 200 of file bodies.h.

double bodies::Sphere::m_radius [protected]

Definition at line 201 of file bodies.h.

double bodies::Sphere::m_radius2 [protected]

Definition at line 203 of file bodies.h.

double bodies::Sphere::m_radiusU [protected]

Definition at line 202 of file bodies.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator


geometric_shapes
Author(s): Ioan Sucan
autogenerated on Fri Jan 11 09:51:08 2013