deMassProp Class Reference
[Utility]

Compute Mass parameters. More...

#include <deMassProp.h>

Collaboration diagram for deMassProp:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 deMassProp ()
 constructor
void zero ()
 set members to zero
void set (const deFloat *mass, const deVector3 *center, const deMatrix3 *inertia)
 set members with given values
void get (deFloat *mass, deVector3 *center, deMatrix3 *inertia)
 get member values
deInt isDensity (deFloat m)
 indicates if m is a density.
fetching methods
return current mass parameters.

deFloatmass ()
deMatrix3inertia ()
deVector3center ()
updating methods
set general mass/inertia parameters for a body defined in the current reference frame.
Remarks:
Calls are accumulative.
Parameters:
f new frame of reference. NULL indicates the identity matrix..


void mass (const deFloat m, const deFrame *f=NULL)
void inertia (const deMatrix3 *inertia, const deFrame *f=NULL)
void inertia (const deVector3 *diag, const deFrame *f=NULL)
void inertia (const deFloat Ixx, const deFloat Iyy, const deFloat Izz, const deFrame *f=NULL)
mass/inertia definitions of homogeneous bodies
specify mass parameters for various homogeneous bodies. With the center of mass located at the current reference frame.
Remarks:
Calls are accumulative.
Parameters:
f new frame of reference. NULL indicates the identity matrix..


void cylinder (const deFloat mp, const deFloat h, const deFloat r, const deFrame *f=NULL)
void cone (const deFloat mp, const deFloat h, const deFloat r, const deFrame *f=NULL)
void pyramid (const deFloat mp, const deFloat a, const deFloat b, const deFloat h, const deFrame *f=NULL)
void block (const deFloat mp, const deFloat a, const deFloat b, const deFloat c, const deFrame *f=NULL)
void sphere (const deFloat mp, const deFloat r, const deFrame *f=NULL)
void hemisphere (const deFloat mp, const deFloat r, const deFrame *f=NULL)
void ellipsoid (const deFloat mp, const deFloat a, const deFloat b, const deFloat c, const deFrame *f=NULL)
void rod (const deFloat mp, const deFloat l, const deFrame *f=NULL)
void disk (const deFloat mp, const deFloat r, const deFrame *f=NULL)
void plate (const deFloat mp, const deFloat a, const deFloat b, const deFrame *f=NULL)
void cylinderShell (const deFloat mp, const deFloat h, const deFloat r, const deFrame *f=NULL)
void coneShell (const deFloat mp, const deFloat h, const deFloat r, const deFrame *f=NULL)
void sphereShell (const deFloat mp, const deFloat r, const deFrame *f=NULL)
void hemisphereShell (const deFloat mp, const deFloat r, const deFrame *f=NULL)
resetting methods
reset mass properties

void scale (const deFloat m)

Detailed Description

Compute Mass parameters.


Constructor & Destructor Documentation

deMassProp::deMassProp  )  [inline]
 

constructor


Member Function Documentation

void deMassProp::block const deFloat  mp,
const deFloat  a,
const deFloat  b,
const deFloat  c,
const deFrame f = NULL
 

Specify the mass parameters to a homogeneous block with center of mass at the current frame.

Parameters:
mp mass (density if dedensity(deFloat)) of block.
a width of base of block along the x-axis.
b length of base of block along the y-axis.
c height of base of block along the z-axis.
block.gif

deVector3* deMassProp::center  )  [inline]
 

return center of mass of object as seen from objects local frame.

void deMassProp::cone const deFloat  mp,
const deFloat  h,
const deFloat  r,
const deFrame f = NULL
 

Specify the mass parameters to a homogeneous cone with center of mass at the current frame. The center of mass of a cone is located h/4 from base in z

Parameters:
mp mass (density if dedensity(deFloat)) of cone.
h total height of cone in z-axis.
r radius of the base of the cone.
cone.gif

void deMassProp::coneShell const deFloat  mp,
const deFloat  h,
const deFloat  r,
const deFrame f = NULL
 

Specify the mass parameters to a homogeneous infinitely thin cone with no base. The center of mass located at the current frame is (1/3)*h from base in z.

Parameters:
mp mass (surface density if dedensity(deFloat)).
h total height of cone shell h in z-axis.
r radius of the base of the cone shell.
coneShell.gif

void deMassProp::cylinder const deFloat  mp,
const deFloat  h,
const deFloat  r,
const deFrame f = NULL
 

Specify the mass parameters to a homogeneous cylinder with center of mass at the current frame.

Parameters:
mp mass (density if dedensity(deFloat)) of cylinder.
h total height of cylinder in z-axis.
r radius of the cylinder.
cylinder.gif

void deMassProp::cylinderShell const deFloat  mp,
const deFloat  h,
const deFloat  r,
const deFrame f = NULL
 

Specify the mass parameters to a homogeneous infinitely thin cylinder with no caps, with center of mass at the current frame.

Parameters:
mp mass (surface density if dedensity(deFloat)).
h total height of cylinder shell in z-axis.
r radius of the cylinder shell.
cylinderShell.gif

void deMassProp::disk const deFloat  mp,
const deFloat  r,
const deFrame f = NULL
 

Specify the mass parameters to a homogeneous two dimensional flat disk with center of mass at the current frame. The disk has zero height in the z-axis.

Parameters:
mp mass (surface density if dedensity(deFloat)).
r radius of disk.
disk.gif

void deMassProp::ellipsoid const deFloat  mp,
const deFloat  a,
const deFloat  b,
const deFloat  c,
const deFrame f = NULL
 

Specify the mass parameters to a homogeneous ellipsoid with center of mass at the current frame.

Parameters:
mp mass (density if dedensity(deFloat)) of ellipsoid.
a length of major axis along the x-axis, one half total width
b length of major axis along the y-axis, one half total length
c length of major axis along the z-axis, one half total height
ellipsoid.gif

void deMassProp::get deFloat mass,
deVector3 center,
deMatrix3 inertia
[inline]
 

get member values

void deMassProp::hemisphere const deFloat  mp,
const deFloat  r,
const deFrame f = NULL
 

Specify the mass parameters to a homogeneous half sphere (hemisphere) with center of mass at the current frame. The center of mass of a hemisphere is located (3/8)*r from base in z

Parameters:
mp mass (density if dedensity(deFloat)) of hemisphere.
r radius of hemisphere.
hemisphere.gif

void deMassProp::hemisphereShell const deFloat  mp,
const deFloat  r,
const deFrame f = NULL
 

Specify the mass parameters to a homogeneous infinitely thin half sphere (hemisphere) with no base. The center of mass located at the current frame is r/2 from the base of the hemisphere in the z-axis.

Parameters:
mp mass (surface density if dedensity(deFloat)).
r radius of the hemisphere.
hemisphereShell.gif

void deMassProp::inertia const deFloat  Ixx,
const deFloat  Iyy,
const deFloat  Izz,
const deFrame f = NULL
 

add an inertia tensor specified by its diagonal (Ixx, Iyy, Izz).

void deMassProp::inertia const deVector3 diag,
const deFrame f = NULL
 

add an inertia tensor specified by its diagonal diag = (Ixx, Iyy, Izz).

void deMassProp::inertia const deMatrix3 inertia,
const deFrame f = NULL
 

add an inertia tensor inertia specified by a 3x3 matrix at the current frame of reference.

deMatrix3* deMassProp::inertia  )  [inline]
 

return inertia of object as seen from objects local frame.

deInt deMassProp::isDensity deFloat  m  )  [inline]
 

indicates if m is a density.

Remarks:
negative m indicates m is a density.
Return values:
0 if m represents a mass
1 if m represents a density

void deMassProp::mass const deFloat  m,
const deFrame f = NULL
 

add a point mass of mass m at a point at the origin of the reference frame. Set frame of reference to be used when specifying a objects mass/inertial properties.

deFloat* deMassProp::mass  )  [inline]
 

return mass of object.

void deMassProp::plate const deFloat  mp,
const deFloat  a,
const deFloat  b,
const deFrame f = NULL
 

Specify the mass parameters to a homogeneous two dimensional flat square plate with center of mass at the current frame. The plate has zero height in the z-axis.

Parameters:
mp mass (surface density if dedensity(deFloat)).
a total width of the in the x-axis .
b total width of the in the y-axis .
plate.gif

void deMassProp::pyramid const deFloat  mp,
const deFloat  a,
const deFloat  b,
const deFloat  h,
const deFrame f = NULL
 

Specify the mass parameters to a homogeneous four sided pyramid with center of mass at the current frame. The center of mass of a pyramid is located h/4 from base in z

Parameters:
mp mass (density if dedensity(deFloat)) of pyramid.
a width of base of pyramid along the x-axis.
b length of base of pyramid along the y-axis.
h total height of pyramid h in z-axis.
pyramid.gif

void deMassProp::rod const deFloat  mp,
const deFloat  l,
const deFrame f = NULL
 

Specify the mass parameters to a homogeneous one dimensional rod having total length l with center of mass at the current frame. The center of mass of a rod is located half way along its length.

Parameters:
mp mass (linear density if dedensity(deFloat)).
l total length of the rod along the z-axis.
rod.gif

void deMassProp::scale const deFloat  m  ) 
 

homogenously scale the mass properities of a given object until total mass equals m.

void deMassProp::set const deFloat mass,
const deVector3 center,
const deMatrix3 inertia
[inline]
 

set members with given values

void deMassProp::sphere const deFloat  mp,
const deFloat  r,
const deFrame f = NULL
 

Specify the mass parameters to a homogeneous sphere with center of mass at the current frame.

Parameters:
mp mass (density if dedensity(deFloat)) of sphere.
r radius of sphere.
sphere.gif

void deMassProp::sphereShell const deFloat  mp,
const deFloat  r,
const deFrame f = NULL
 

Specify the mass parameters to a homogeneous infinitely thin sphere, with center of mass at the current frame.

Parameters:
mp mass (surface density if dedensity(deFloat)).
r radius of the sphere.
sphereShell.gif

void deMassProp::zero  )  [inline]
 

set members to zero


The documentation for this class was generated from the following files:
Generated on Sun Apr 9 22:12:45 2006 for TAO by  doxygen 1.4.6-NO