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

class part

Parts are the basic building blocks from which links are made.

Public Fields

[more]part* root
root of part tree for parts belonging to the same link
[more]part* parent
the parent part.
[more]ptrList* children
list of child parts
[more]connector* parentConnector
connector to the parent part; NULL if this part is the parent
[more]ptrList* connectors
a list of the part's connectors
[more]ptrList* mpolyList
list of polyhedra used for computing inertial properties
[more]ptrList* bpolyList
list of polyhedra that bound the part; used for checking collisions
[more]ptrList* dpolyList
list of polyhedra used for display purposes
[more]assembly* as
assembly to which the part belongs
[more]link* l
the link to which the part belongs
[more]tmatrix toLink
a matrix transforming part to link coordinates
[more]triple com
center of mass of the part, in link coords
[more]double mass
mass of the part
[more]matrix Ibody
inertia matrix in link coords
[more]linkForceRecord* frecs
linked list of force records associated with the part; managed by link
[more]const char* name
the name of the part; can be NULL, and will *not* be deleted by part::~part
[more]synObject* owner
the owner of the part
[more]int ownerIdx
an index that can be used by the owner

Public Methods

[more] part(void)
constructor
[more] ~part(void)
destructor
[more] normal mpoly methods
[more] display mpoly methods
[more] bounding mpoly methods
[more] convenience methods
[more] coordinate transformation


Documentation

Parts are the basic building blocks from which links are made. each part has a number of connectors through which it can be connected to other parts. All of the parts in a link are connected in a tree, with connections between parts formed by objects of the connection class. All parts within a link are rigidly attached to each other. Parts also contain descriptions of their geometry: a list of mpoly objects (mpolyList) is used for computing inertial properties, an optional list of mpolys for bounding geometry (bpolyList), and an optional list of mpolys for display geometry (dpolyList).
opart* root
root of part tree for parts belonging to the same link

opart* parent
the parent part. if this part is the parent for the tree, then parent should be NULL.

optrList* children
list of child parts

oconnector* parentConnector
connector to the parent part; NULL if this part is the parent

optrList* connectors
a list of the part's connectors

optrList* mpolyList
list of polyhedra used for computing inertial properties

optrList* bpolyList
list of polyhedra that bound the part; used for checking collisions

optrList* dpolyList
list of polyhedra used for display purposes

oassembly* as
assembly to which the part belongs

olink* l
the link to which the part belongs

otmatrix toLink
a matrix transforming part to link coordinates

otriple com
center of mass of the part, in link coords

odouble mass
mass of the part

omatrix Ibody
inertia matrix in link coords

olinkForceRecord* frecs
linked list of force records associated with the part; managed by link

oconst char* name
the name of the part; can be NULL, and will *not* be deleted by part::~part

osynObject* owner
the owner of the part

oint ownerIdx
an index that can be used by the owner

o part(void)
constructor

o ~part(void)
destructor

o normal mpoly methods

oinline void addMPoly(mpoly* mp)
adds an mpoly

ovoid addMPolyList(ptrList* p)
adds a ptrlist of mpolys

o display mpoly methods

oinline void addDPoly(mpoly* mp)
adds a single display mpoly

oinline void useDPolyList(void)
explicitly allocates bpolyList

ovoid addDPolyList(ptrList* p)
adds display mpolys from a ptrlist

o bounding mpoly methods

oinline void useBPolyList(void)
explicitly allocates bpolyList

oinline void addBPoly(mpoly* mp)
adds a single bounding poly

ovoid addBPolyList(ptrList* p)
adds bounding mpolys from a ptrlist

o convenience methods

oinline int numConnectors(void) const
returns the number of connectors the part has

oinline connector* getConnector(int n)
returns the indicated connector

oinline connector* getConnectorById(int id)
returns the connector with the given id, or NULL if not found

oinline int numChildren(void) const
returns the number of child parts

oinline part* getChild(int i)
returns the ith child part

oinline mpoly* getMPoly(int i)
gets the ith mpoly

oinline mpoly* getBPoly(int i)
gets the ith bpoly. note: bpolyList may be NULL; check first

oinline mpoly* getDPoly(int i)
gets the ith dpoly. note: dpolys may be NULL; check first

o coordinate transformation

oinline triple convertToLinkCoords(const triple &partCoord)
converts the given point from part to link coordinates

oinline triple convertToWorldCoords(const triple &partCoord)
converts the given point from part to world coordinates

oinline triple convertDirectionToWorldCoords(const triple &partDir)
converts the given direction vector from part to link coordinates

oinline triple convertDirectionToLinkCoords(const triple &partDir)
converts the given direction vector from part to world coordinates

oquaternion convertToLinkCoords(quaternion &partQ)
converts the given quaternion from part to link coordinates


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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