![]() |
VR-Link API Documentation for HLA 1.3
|
A DtArticulatedPartCollection is a collection of articulated parts typically of an entity. More...
Collaboration diagram for DtArticulatedPartCollection:Public Types | |
| typedef std::map< unsigned int, DtArticulatedPart * > | PartMap |
| typedef PartMap::const_iterator | const_iterator |
| typedef std::set< unsigned int > | PartTypeSet |
Public Member Functions | |
| DtArticulatedPartCollection (DtClock *clock=0) | |
| CTOR. | |
| DtArticulatedPartCollection (const DtArticulatedPartCollection &) | |
| Copy CTOR. | |
| DtArticulatedPartCollection & | operator= (const DtArticulatedPartCollection &) |
| Assignment operator. | |
| virtual | ~DtArticulatedPartCollection () |
| DTOR. | |
| bool | operator== (const DtArticulatedPartCollection &other) const |
| bool | operator!= (const DtArticulatedPartCollection &other) const |
| virtual void | getPartTypes (PartTypeSet &aSet) |
| Get all of the part types by adding each part type to a part type set. | |
| virtual DtArticulatedPart & | getPart (unsigned int partType) |
| Get the art part of a part type. If the part type does not exist it will be created. | |
| virtual void | removeAllParts () |
| Removes all parts. | |
| virtual void | removePart (unsigned int partType) |
| Remove a part. | |
| virtual void | attachPart (DtArticulatedPart *childPart, DtArticulatedPart *parentPart) |
| Attach a child part to a parent part. | |
| void | attachPart (unsigned int childPartType, unsigned int parentPartType) |
| Helper function which looks up via type. | |
| virtual unsigned int | totalParameterCount () const |
| Get the sum of the number of parameters for all parts. | |
| virtual unsigned int | partCount () const |
| Get the number of parts. | |
| virtual DtArticulatedPart * | createPart (DtArticulatedPart *copy=0) const |
| Function used to create a part instance. | |
| const_iterator | begin () const |
| Get a constant iterator to the first part. | |
| const_iterator | end () const |
| Get a constant iterator beyond the last part. | |
| virtual void | setClock (DtClock *clock, bool setForAllParts=true) |
| Set the clock object. | |
| bool | partsApproximateByDefault () const |
| Get if parts approximate by default. | |
| void | setPartsApproximateByDefault (bool deadReckonByDefault) |
| Set whether parts approximate by default. | |
| void | printDataToStream (std::ostream &stream) const |
| Print the collection to a stream. | |
| const std::vector < DtArticulatedPart * > & | getSortedList () const |
| Get the parts in a sorted list useful for encoding. | |
| virtual DtArticulatedPart * | findPart (unsigned int partType) |
| Search for a particular part. | |
| virtual const DtArticulatedPart * | findPart (unsigned int partType) const |
| Search for a particular part. | |
| DtClock * | clock () |
| Get the clock pointer, it may be NULL. | |
| const DtClock * | clock () const |
| Get the clock pointer, it may be NULL. | |
Protected Member Functions | |
| virtual void | sortArtParts () const |
| Sort the internal list. | |
| int | calculatePartDistance (DtArticulatedPart *part) const |
| Internal calculate distance function. | |
Protected Attributes | |
| PartMap | myPartMap |
| DtClock * | myClock |
| bool | myDefaultApproximatingFlag |
| std::vector< DtArticulatedPart * > | mySortedList |
| bool | myNeedsSortingFlag |
A DtArticulatedPartCollection is a collection of articulated parts typically of an entity.
| typedef PartMap::const_iterator DtArticulatedPartCollection::const_iterator |
| typedef std::map<unsigned int,DtArticulatedPart*> DtArticulatedPartCollection::PartMap |
| typedef std::set<unsigned int> DtArticulatedPartCollection::PartTypeSet |
| DtArticulatedPartCollection::DtArticulatedPartCollection | ( | DtClock * | clock = 0 | ) |
CTOR.
| Input | |
| clock | is an optional parameter for setting the clock. The clock is passed to each newly create part. |
| DtArticulatedPartCollection::DtArticulatedPartCollection | ( | const DtArticulatedPartCollection & | ) |
Copy CTOR.
|
virtual |
DTOR.
|
virtual |
Attach a child part to a parent part.
| DtCorruptedState | if childPart == parentPart |
Referenced by attachPart().
|
inline |
Helper function which looks up via type.
References attachPart(), and findPart().
| const_iterator DtArticulatedPartCollection::begin | ( | ) | const |
Get a constant iterator to the first part.
|
protected |
Internal calculate distance function.
| DtCorruptedState | if a circulate dependency is detected. |
| DtClock* DtArticulatedPartCollection::clock | ( | ) |
Get the clock pointer, it may be NULL.
| const DtClock* DtArticulatedPartCollection::clock | ( | ) | const |
Get the clock pointer, it may be NULL.
|
virtual |
Function used to create a part instance.
This is a separate function to allow subclasses to create the part instances.
| Input | |
| copy | is an optional parameter which should be used with a copy constructor when copy is valid. |
| const_iterator DtArticulatedPartCollection::end | ( | ) | const |
Get a constant iterator beyond the last part.
|
virtual |
Search for a particular part.
If the part does not exist the function will return null.
| 0 | If the part is not found. |
Referenced by attachPart().
|
virtual |
Search for a particular part.
If the part does not exist the function will return null.
| 0 | If the part is not found. |
|
virtual |
Get the art part of a part type. If the part type does not exist it will be created.
|
virtual |
Get all of the part types by adding each part type to a part type set.
This
| Output | |
| aSet | is used to store the part types. Note aSet is not cleared. |
| const std::vector<DtArticulatedPart*>& DtArticulatedPartCollection::getSortedList | ( | ) | const |
Get the parts in a sorted list useful for encoding.
| DtCorruptedState | if a circulate dependency is detected. |
| bool DtArticulatedPartCollection::operator!= | ( | const DtArticulatedPartCollection & | other | ) | const |
| DtArticulatedPartCollection& DtArticulatedPartCollection::operator= | ( | const DtArticulatedPartCollection & | ) |
Assignment operator.
| bool DtArticulatedPartCollection::operator== | ( | const DtArticulatedPartCollection & | other | ) | const |
|
virtual |
Get the number of parts.
| bool DtArticulatedPartCollection::partsApproximateByDefault | ( | ) | const |
Get if parts approximate by default.
This is true by default for all articulated part collections.
| void DtArticulatedPartCollection::printDataToStream | ( | std::ostream & | stream | ) | const |
Print the collection to a stream.
|
virtual |
Removes all parts.
|
virtual |
Remove a part.
If the part is not found the function does nothing.
|
virtual |
Set the clock object.
Optionally this will set the clock object for all existing parts.
| Input | |
| clock | the clock pointer, which may be NULL. |
| setForAllParts | controls whether each existing part get the new clock pointer as well. |
| void DtArticulatedPartCollection::setPartsApproximateByDefault | ( | bool | deadReckonByDefault | ) |
Set whether parts approximate by default.
|
protectedvirtual |
Sort the internal list.
| DtCorruptedState | if a circulate dependency is detected. |
|
virtual |
Get the sum of the number of parameters for all parts.
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
mutableprotected |