Contents User Forum Source Index APIs by Task APIs by Level Data


G3D::Capsule Class Reference

A shape formed by extruding a sphere along a line segment. More...

#include <Capsule.h>

List of all members.

Public Member Functions

float area () const
Line axis () const
 Capsule (const Vector3 &_p1, const Vector3 &_p2, float _r)
 Capsule (class BinaryInput &b)
 Capsule ()
Vector3 center () const
bool contains (const Vector3 &p) const
void deserialize (class BinaryInput &b)
void getBounds (AABox &out) const
void getRandomSurfacePoint (Vector3 &P, Vector3 &N) const
void getReferenceFrame (class CoordinateFrame &cframe) const
float height () const
Vector3 point (int i) const
float radius () const
Vector3 randomInteriorPoint () const
void serialize (class BinaryOutput &b) const
float volume () const


Detailed Description

A shape formed by extruding a sphere along a line segment.


Constructor & Destructor Documentation

G3D::Capsule::Capsule (  ) 

Uninitialized.

G3D::Capsule::Capsule ( class BinaryInput b  ) 

G3D::Capsule::Capsule ( const Vector3 _p1,
const Vector3 _p2,
float  _r 
)


Member Function Documentation

float G3D::Capsule::area (  )  const

Line G3D::Capsule::axis (  )  const

The line down the center of the capsule.

Vector3 G3D::Capsule::center (  )  const [inline]

bool G3D::Capsule::contains ( const Vector3 p  )  const

Returns true if the point is inside the capsule or on its surface.

void G3D::Capsule::deserialize ( class BinaryInput b  ) 

void G3D::Capsule::getBounds ( AABox out  )  const

Get axis aligned bounding box.

void G3D::Capsule::getRandomSurfacePoint ( Vector3 P,
Vector3 N 
) const

Random world space point with outward facing normal.

void G3D::Capsule::getReferenceFrame ( class CoordinateFrame cframe  )  const

Get a reference frame in which the center of mass is the origin and Y is the axis of the capsule.

float G3D::Capsule::height (  )  const [inline]

Distance between the sphere centers.

The total extent of the cylinder is 2r + h.

Vector3 G3D::Capsule::point ( int  i  )  const [inline]

Argument may be 0 or 1.

float G3D::Capsule::radius (  )  const [inline]

Vector3 G3D::Capsule::randomInteriorPoint (  )  const

Point selected uniformly at random over the volume.

void G3D::Capsule::serialize ( class BinaryOutput b  )  const

float G3D::Capsule::volume (  )  const


The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:45 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo