In file /home/blah/darwin2k/src/dyno/mechanism/dyno.h:

class mpoly

The mpoly class represenents a polyhedra and its material properties.

Public Fields

[more]int npts
the number of vertices
[more]int nfaces
the number of faces
[more]triple* pts
an array of vertices
[more]polyhedronFace* faces
an array of polyhedron faces
[more]double density
the density of the mpoly; used for inertial calculations
[more]part* p
the part to which the mpoly belongs
[more]unsigned char processed
a flag indicating whether process() has been called yet

Public Methods

[more]inline mpoly(void)
constructor
[more] mpoly(const mpoly &other)
copy constructor - makes a copy of all of other's arrays
[more] ~mpoly(void)
destructor
[more]int process(void)
computes normals and other information for each polyhedronFace
[more]void transform(const tmatrix &m)
transforms the mpoly's coordinates (both vertices and face normals)
[more]void setAppearance(void* app)
sets polyhedronFace::appearance for each face
[more]void setColor(const float* Color)
set polyedronFace::color for each face, copying Color's contents


Documentation

The mpoly class represenents a polyhedra and its material properties. mpolys are used for several purposes: - for computing inertial properties of a link - for checking collisions between objects - for display The mpoly is organized as an indexed face set: there is an array of vertices and an array of polyhedronFaces. Each face contains an array of indices indicating which vertices are used by the face. The vertices for each face should be arranged in counter-clockwise order when viewed from outside the mpoly.
oint npts
the number of vertices

oint nfaces
the number of faces

otriple* pts
an array of vertices

opolyhedronFace* faces
an array of polyhedron faces

odouble density
the density of the mpoly; used for inertial calculations

opart* p
the part to which the mpoly belongs

ounsigned char processed
a flag indicating whether process() has been called yet

oinline mpoly(void)
constructor

o mpoly(const mpoly &other)
copy constructor - makes a copy of all of other's arrays

o ~mpoly(void)
destructor

oint process(void)
computes normals and other information for each polyhedronFace

ovoid transform(const tmatrix &m)
transforms the mpoly's coordinates (both vertices and face normals)

ovoid setAppearance(void* app)
sets polyhedronFace::appearance for each face

ovoid setColor(const float* Color)
set polyedronFace::color for each face, copying Color's contents


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.