#include <rdGBody.h>
Inheritance diagram for rdGBody:

Public Member Functions | |
| rdGBody () | |
| Construct an empty graphics body. | |
| rdGBody (IDOM_Element *aElement) | |
| Construct a graphics body from an XML Element. | |
| virtual | ~rdGBody () |
| Destructor. | |
| void | setOrigin (double aX, double aY, double aZ) |
| Set the origin of the body. | |
| void | getOrigin (double rP[3]) const |
| Get the origin of the body. | |
| void | setPX (double aX, double aY, double aZ) |
| Set a point along the desired x axis of the body. | |
| void | setPY (double aX, double aY, double aZ) |
| Set a point along the desired y axis of the body. | |
| void | setPZ (double aX, double aY, double aZ) |
| Set a point along the desired z axis of the body. | |
| void | setDensity (double aDensity) |
| Set the density of this body. | |
| double | getDensity () const |
| Get the density of this body. | |
| void | setMass (double aMass) |
| Set the mass of this body. | |
| double | getMass () const |
| Get the mass of this body. | |
| void | setCenterOfMass (const double aCOM[3]) |
| Set the center of mass of this body. | |
| void | getCenterOfMass (double rCOM[3]) const |
| Get the center of mass of this body. | |
| void | setInertiaTensor (const double aI[6]) |
| void | getInertiaTensor (double rI[9]) const |
| Get the inertia tensor of this body. | |
| void | translate (double aX, double aY, double aZ) |
| Translate the vertices of this body by a specified amount. | |
| void | rotate (int aXYZ, double aRadians) |
| Rotate a the vertices of this body about the X, Y, or Z axis by a specified amount. | |
| void | rotate (int aXYZ, double aRadians, const double aP[3]) |
| Rotate a the vertices of this body about a point about the X, Y, or Z axis by a specified amount. | |
| bool | isInside (const double aPoint[3]) const |
| Determine whether or not a point is inside this body. | |
| void | estimateInertialProperties (double aCubeSize=0.0) |
| Estimate the inertial properties of this body. | |
| void | computeNewFrame () |
| Compute a new body frame. | |
| void | updateEdgeIndices () |
| Update the edge indices. | |
| void | updateTriangleIndices () |
| Update the triangle indices. | |
| void | computeUpperBounds () |
| Compute the upper bounds of this body. | |
| void | computeLowerBounds () |
| Compute the lower bounds of this body. | |
| void | computeBounds () |
| Compute the bounds of this body. | |
| void | printBoneFile (const char *aFileName=NULL) |
| Print a SIMM bone file. | |
| virtual void | updateObject (bool aDeep=true) |
| Update this object based on its XML node. | |
| virtual void | updateNode (bool aDeep=true) |
| Update the XML node representing this object. | |
| void | updateData () |
| Update the member data of this object based on its XML node. | |
Private Member Functions | |
| void | setNull () |
| Set NULL values for all member variables. | |
Private Attributes | |
| double | _origin [3] |
| Origin of the coordinate system for the body. | |
| double | _x [3] |
| X axis of the body. | |
| double | _y [3] |
| Y axis of the body. | |
| double | _z [3] |
| Z axis of the body. | |
| double | _px [3] |
| The unit vector directed from the origin to px is the desired x axis. | |
| double | _py [3] |
| The unit vector directed from the origin to py is the desired y axis. | |
| double | _pz [3] |
| The unit vector directed from the origin to pz is the desired z axis. | |
| rdVertices * | _vertices |
| List of vertices. | |
| rdEdges * | _edges |
| List of edges. | |
| rdTriangles * | _triangles |
| List of triangles. | |
| rdGBodies * | _bodies |
| List of child bodies. | |
| double | _lower [3] |
| Lower bounds. | |
| double | _upper [3] |
| Upper bounds. | |
| double | _density |
| Density. | |
| double | _mass |
| Mass. | |
| double | _com [3] |
| Center of mass. | |
| double | _inertia [3][3] |
| Inertia tensor. | |
|
|
Construct a graphics body from an XML Element.
|
|
|
Compute a new body frame. This procedure is done based on what has been set for the origin, px, py, and pz. All vertices in the body are translated so that the new origin lies at the point originally set for the origin, then they are rotated so that if possible, the x axis passes through px, the y axis through py, and the z axis through pz. When finished, the origin will be (0,0,0). |
|
|
Estimate the inertial properties of this body. The inertial properties include mass, center of mass, and the inertia tensor. These properties are estimated by assuming a uniform density and integrating over the volume of the body. A cube of finite dimension (aCubeSize) is used as the volume element dx*dy*dz for performing the integration. If aCubeSize has a value less than or equal to zero, the size of the cube is chosen to be 0.01 times the size of the smallest dimension of the body. That is, aCubeSize = 0.01*(upper[i]-lower[i]), i=0,1, or 2, whichever is smallest.
|
|
|
Get the center of mass of this body.
|
|
|
Get the density of this body.
|
|
|
Get the inertia tensor of this body.
|
|
|
Get the mass of this body.
|
|
|
Get the origin of the body.
|
|
|
Determine whether or not a point is inside this body. This method assumes that this body is a closed volume. If this body is not closed, the returned result may not be meaningful.
|
|
|
Print a SIMM bone file.
|
|
||||||||||||||||
|
Rotate a the vertices of this body about a point about the X, Y, or Z axis by a specified amount.
|
|
||||||||||||
|
Rotate a the vertices of this body about the X, Y, or Z axis by a specified amount.
|
|
|
Set the center of mass of this body.
|
|
|
Set the density of this body.
|
|
|
Set the mass of this body.
|
|
||||||||||||||||
|
Set the origin of the body. Whenever the origin is set, the points _px, _py, and _pz, which are used to set desired directions for the coordinate axes of the body, are also set to the value of the origin
|
|
||||||||||||||||
|
Set a point along the desired x axis of the body.
|
|
||||||||||||||||
|
Set a point along the desired y axis of the body.
|
|
||||||||||||||||
|
Set a point along the desired z axis of the body.
|
|
||||||||||||||||
|
Translate the vertices of this body by a specified amount.
|
|
|
Update the member data of this object based on its XML node. Member objects (children) are not updated. |
|
|
Update the XML node representing this object.
Reimplemented from rdObject. |
|
|
Update this object based on its XML node.
Reimplemented from rdObject. |
1.3