VirtualPhysics the realtime dynamics simulation library

vpBox Class Reference

Box primitive geometry. More...

#include <vpGeom.h>

Inheritance diagram for vpBox:

vpGeom

List of all members.

Public Member Functions

 vpBox ()
 vpBox (const Vec3 &)
void SetSize (const Vec3 &)
Vec3 GetSize (void) const
virtual void GetShape (char *type, scalar *data) const
virtual Inertia GetInertia (scalar) const
virtual scalar GetBoundingSphereRadius (void) const
virtual Vec3 GetAABB (void) const


Detailed Description

vpBox is a class to model a rectangular box.
box.gif
Examples:

pendulum.cpp.


Constructor & Destructor Documentation

vpBox::vpBox (  ) 

default size of the box is 1 X 1 X 1.

vpBox::vpBox ( const Vec3  ) 

construct a box of the given size.


Member Function Documentation

VP_INLINE void vpBox::SetSize ( const Vec3 size  ) 

set a size of the box.

VP_INLINE Vec3 vpBox::GetSize ( void   )  const

get a size of the box.

VP_INLINE void vpBox::GetShape ( char *  type,
scalar *  data 
) const [virtual]

get a shape information. return type = 'B', data[0] = size_x, data[1] = size_y, data[2] = size_z

Implements vpGeom.

virtual Inertia vpBox::GetInertia ( scalar   )  const [virtual]

get an inertia of the geometry.

Implements vpGeom.

VP_INLINE scalar vpBox::GetBoundingSphereRadius ( void   )  const [virtual]

get a radius of a bounding sphere.

Implements vpGeom.

VP_INLINE Vec3 vpBox::GetAABB ( void   )  const [virtual]

get an axis aligned bounding box which size is (-re[0], re[0]) X (-re[1], re[1]) X (-re[2], re[2]).

Implements vpGeom.


Generated on Wed Jun 11 23:11:49 2008 for VirtualPhysics by  doxygen 1.5.5