![]() |
VR-Link API Documentation for HLA 1.3
|
A single articulated part which has a number of parameters. More...
Collaboration diagram for DtArticulatedPart:Classes | |
| struct | Parameter |
| A parameter structure. More... | |
Public Types | |
| enum | ParameterMetrics { ParameterMetric_Position = 1, ParameterMetric_PositionRate = 2, ParameterMetric_Extension = 3, ParameterMetric_ExtensionRate = 4, ParameterMetric_X = 5, ParameterMetric_XRate = 6, ParameterMetric_Y = 7, ParameterMetric_YRate = 8, ParameterMetric_Z = 9, ParameterMetric_ZRate = 10, ParameterMetric_Azimuth = 11, ParameterMetric_AzimuthRate = 12, ParameterMetric_Elevation = 13, ParameterMetric_ElevationRate = 14, ParameterMetric_Rotation = 15, ParameterMetric_RotationRate = 16 } |
| Standard parameter metrics enumerations. More... | |
| typedef unsigned char | ParameterMetric |
| A Metric is only 5 bits, aka 0-31, only 1-16 are typically defined. | |
Public Member Functions | |
| DtArticulatedPart (DtClock *clock=0) | |
| CTOR. | |
| DtArticulatedPart (const DtArticulatedPart ©) | |
| Copy CTOR. | |
| DtArticulatedPart & | operator= (const DtArticulatedPart ©) |
| Assignment operator. | |
| virtual | ~DtArticulatedPart () |
| DTOR. | |
| bool | operator== (const DtArticulatedPart &other) const |
| Equality/Inequality operators. | |
| bool | operator!= (const DtArticulatedPart &other) const |
| virtual bool | hasTheSameMetrics (const DtArticulatedPart &other) const |
| Do the two parts have the same parameter metrics set (the values may be different. | |
| virtual unsigned int | parameterCount () const |
| Get the number of set parameters. | |
| virtual int | partTypeAttachedTo () const |
| Get the part type id attached too. | |
| virtual void | setPartTypeAttachedTo (int attachedTo) |
| Set the attached to part id. | |
| virtual unsigned short | attachedToPartIndex () const |
| Get an index for the attached to part. This should only be called by the Collection. | |
| virtual void | setAttachedToPartIndex (unsigned int index) |
| Set an index for the attached to part. This should only be called by the Collection. | |
| virtual unsigned int | partType () const |
| Get this articulated part type. | |
| virtual void | setPartType (unsigned int artPartType) |
| Set the part type. | |
| virtual void | getParameterMetrics (std::vector< ParameterMetric > &metrics) const |
| Get the set parameter metrics by adding the parameter metrics to the provided vector. | |
| virtual bool | setParameter (ParameterMetric parameterMetric, const Parameter ¶meter, bool setOnlyValue=true) |
| Set the parameter. | |
| bool | setParameter (ParameterMetric parameterMetric, float value) |
| Set the parameter, set only the value. | |
| virtual bool | getParameter (ParameterMetric parameterMetric, Parameter ¶meter) const |
| Get the parameter written into the provided parameter. | |
| virtual float | getParameterValue (ParameterMetric parameterMetric, double time) const |
| Get a parameter value. | |
| float | getParameterValue (ParameterMetric parameterMetric) const |
| Get the parameter value using the internal clock. | |
| virtual void | unsetParameter (ParameterMetric parameterMetric) |
| Clear a parameter so it appears the parameter is not set. Calls to getParameter will fail. | |
| virtual void | unsetAllParameters () |
| Clear all parameters. This is useful when decoding the complete 'state'. | |
| virtual void | incrementChange (ParameterMetric parameterMetric) |
| Increment the change parameter for the metric. | |
| virtual bool | approximating () const |
| Are we deadreckoning the values. | |
| virtual void | setApproximating (bool deadreckoning) |
| Set whether we are deadreckoning the values. | |
| virtual void | setClock (DtClock *clock) |
| Set the clock to use with approximating using the simTime. | |
| virtual void | printDataToStream (std::ostream &str) const |
| Print the part data to the specified stream. | |
| DtClock * | clock () |
| Get the clock. | |
| const DtClock * | clock () const |
| Get the clock. | |
| bool | isParameterSet (ParameterMetric parameterMetric) const |
| Check to see if a parameter is set. | |
| bool | isParameterMetricValid (ParameterMetric parameterMetric) const |
| Check to see if a parameter metric is valid. | |
| bool | isParameterApproximated (ParameterMetric parameterMetric) const |
| Check to is if parameter is approximated. | |
| unsigned int | getParameterRateMetric (ParameterMetric parameterMetric) const |
| Get the parameter metric for a parameter's rate. | |
| bool | hasTranslation () const |
| Helper function to check to see if translation has been set. | |
| DtVector | translation () const |
| Helper to get translation. The translation may be dead-reckoned. | |
| DtVector | translation (double time) const |
| Helper to get translation. The translation may be dead-reckoned. | |
| bool | getTranslation (DtVector &vec) const |
| Helper to get translation. The translation may be dead-reckoned. | |
| bool | getTranslation (DtVector &vec, double time) const |
| Helper to get translation. The translation may be dead-reckoned. | |
| void | setTranslation (const DtVector &trans) |
| Helper to set the translation. | |
| bool | hasTranslationRate () const |
| Helper function to check to see if translation rate has been set. | |
| DtVector | translationRate () const |
| Helper to get the translation rate. | |
| bool | getTranslationRate (DtVector &vec) const |
| Helper to get the translation rate. | |
| void | setTranslationRate (const DtVector &transRate) |
| Helper to set the translation rate. | |
| bool | hasOrientation () const |
| Helper function to check to see if orientation has been set. | |
| DtTaitBryan | orientation () const |
| Helper to get the orientation. | |
| DtTaitBryan | orientation (double time) const |
| Helper to get orientation. The orientation may be dead-reckoned. | |
| bool | getOrientation (DtTaitBryan &ori) const |
| Helper to get the orientation. | |
| bool | getOrientation (DtTaitBryan &ori, double time) const |
| Helper to get the orientation if it is set. | |
| void | setOrientation (const DtTaitBryan &ori) |
| Helper to set the orientation. | |
| bool | hasOrientationRate () const |
| Helper function to check to see if orientation has been set. | |
| DtVector | orientationRate () const |
| Helper to get orientation. The orientation may be dead-reckoned. | |
| bool | getOrientationRate (DtVector &oriRate) const |
| Helper to get the orientation. | |
| void | setOrientationRate (const DtVector &oriRate) |
| Helper to set the orientation rate. | |
Static Public Member Functions | |
| static unsigned int | decodeArtPartType (unsigned int type) |
| Get the part type from the part and parameter value. | |
| static unsigned char | decodeArtPartParamMetric (unsigned int type) |
| Get the parameter metric from the part and parameter value. | |
| static unsigned int | encodeArtPartParamType (unsigned int partType, unsigned char paramMetric) |
| static bool | approximatingEnabledFlag () |
| static void | setApproximatingEnabledFlag (bool enabled) |
Protected Attributes | |
| int | myPartTypeAttachedTo |
| unsigned short | myAttachedToPartIndex |
| unsigned int | myPartType |
| unsigned int | myParameterMask |
| std::vector< Parameter > | myParameters |
| bool | myApproximatingFlag |
| DtClock * | myClock |
Static Protected Attributes | |
| static bool | theApproximatingEnabledFlag |
A single articulated part which has a number of parameters.
| typedef unsigned char DtArticulatedPart::ParameterMetric |
A Metric is only 5 bits, aka 0-31, only 1-16 are typically defined.
Standard parameter metrics enumerations.
These enumerations are equivalent to those in disEnums.h:1504. Typically HLA & DIS enumerations can directly be used. However if necessary map to these provided enumerations if using another protocol.
| DtArticulatedPart::DtArticulatedPart | ( | DtClock * | clock = 0 | ) |
CTOR.
| Input | |
| clock | pass in an optional clock to use for deadreckoning. |
| DtArticulatedPart::DtArticulatedPart | ( | const DtArticulatedPart & | copy | ) |
Copy CTOR.
| virtual DtArticulatedPart::~DtArticulatedPart | ( | ) | [virtual] |
DTOR.
| virtual bool DtArticulatedPart::approximating | ( | ) | const [virtual] |
Are we deadreckoning the values.
| static bool DtArticulatedPart::approximatingEnabledFlag | ( | ) | [static] |
| virtual unsigned short DtArticulatedPart::attachedToPartIndex | ( | ) | const [virtual] |
Get an index for the attached to part. This should only be called by the Collection.
Get the clock.
| const DtClock* DtArticulatedPart::clock | ( | ) | const |
Get the clock.
| static unsigned char DtArticulatedPart::decodeArtPartParamMetric | ( | unsigned int | type | ) | [inline, static] |
Get the parameter metric from the part and parameter value.
| static unsigned int DtArticulatedPart::decodeArtPartType | ( | unsigned int | type | ) | [inline, static] |
Get the part type from the part and parameter value.
| static unsigned int DtArticulatedPart::encodeArtPartParamType | ( | unsigned int | partType, |
| unsigned char | paramMetric | ||
| ) | [inline, static] |
| bool DtArticulatedPart::getOrientation | ( | DtTaitBryan & | ori | ) | const [inline] |
Helper to get the orientation.
| bool DtArticulatedPart::getOrientation | ( | DtTaitBryan & | ori, |
| double | time | ||
| ) | const [inline] |
Helper to get the orientation if it is set.
| bool DtArticulatedPart::getOrientationRate | ( | DtVector & | oriRate | ) | const [inline] |
Helper to get the orientation.
| virtual bool DtArticulatedPart::getParameter | ( | ParameterMetric | parameterMetric, |
| Parameter & | parameter | ||
| ) | const [virtual] |
Get the parameter written into the provided parameter.
The parameter's value is NOT dead reckoned.
| true | if the parameter metric was set and the parameter was written too. |
| false | if the parameter metric was NOT set. |
| virtual void DtArticulatedPart::getParameterMetrics | ( | std::vector< ParameterMetric > & | metrics | ) | const [virtual] |
Get the set parameter metrics by adding the parameter metrics to the provided vector.
| unsigned int DtArticulatedPart::getParameterRateMetric | ( | ParameterMetric | parameterMetric | ) | const [inline] |
Get the parameter metric for a parameter's rate.
| Input | |
| parameterMetric | the parameter metric to get to rate of. |
| the | parameter metric of a rate. If the input is already a rate, the input is returned. |
| virtual float DtArticulatedPart::getParameterValue | ( | ParameterMetric | parameterMetric, |
| double | time | ||
| ) | const [virtual] |
Get a parameter value.
This value may be dead reckoned. If you do not want a dead reckoned value use getParameter.
| Input | |
| time | Pass in the time you want the value deadreckoned to, or use the default -1.0 to indicate using the internal clock. |
| 0.0 | if the parameter is not set. |
| float DtArticulatedPart::getParameterValue | ( | ParameterMetric | parameterMetric | ) | const [inline] |
Get the parameter value using the internal clock.
| Input | |
| parameterMetric | the metric to lookup. |
| bool DtArticulatedPart::getTranslation | ( | DtVector & | vec | ) | const [inline] |
Helper to get translation. The translation may be dead-reckoned.
| bool DtArticulatedPart::getTranslation | ( | DtVector & | vec, |
| double | time | ||
| ) | const [inline] |
Helper to get translation. The translation may be dead-reckoned.
| bool DtArticulatedPart::getTranslationRate | ( | DtVector & | vec | ) | const [inline] |
Helper to get the translation rate.
| bool DtArticulatedPart::hasOrientation | ( | ) | const [inline] |
Helper function to check to see if orientation has been set.
| bool DtArticulatedPart::hasOrientationRate | ( | ) | const [inline] |
Helper function to check to see if orientation has been set.
| virtual bool DtArticulatedPart::hasTheSameMetrics | ( | const DtArticulatedPart & | other | ) | const [virtual] |
Do the two parts have the same parameter metrics set (the values may be different.
| bool DtArticulatedPart::hasTranslation | ( | ) | const [inline] |
Helper function to check to see if translation has been set.
| bool DtArticulatedPart::hasTranslationRate | ( | ) | const [inline] |
Helper function to check to see if translation rate has been set.
| virtual void DtArticulatedPart::incrementChange | ( | ParameterMetric | parameterMetric | ) | [virtual] |
Increment the change parameter for the metric.
| bool DtArticulatedPart::isParameterApproximated | ( | ParameterMetric | parameterMetric | ) | const [inline] |
Check to is if parameter is approximated.
| bool DtArticulatedPart::isParameterMetricValid | ( | ParameterMetric | parameterMetric | ) | const [inline] |
Check to see if a parameter metric is valid.
| bool DtArticulatedPart::isParameterSet | ( | ParameterMetric | parameterMetric | ) | const [inline] |
Check to see if a parameter is set.
| bool DtArticulatedPart::operator!= | ( | const DtArticulatedPart & | other | ) | const |
| DtArticulatedPart& DtArticulatedPart::operator= | ( | const DtArticulatedPart & | copy | ) |
Assignment operator.
| bool DtArticulatedPart::operator== | ( | const DtArticulatedPart & | other | ) | const |
Equality/Inequality operators.
These do not use dead-reckoned values to check for equality.
| DtTaitBryan DtArticulatedPart::orientation | ( | ) | const [inline] |
Helper to get the orientation.
| DtTaitBryan DtArticulatedPart::orientation | ( | double | time | ) | const [inline] |
Helper to get orientation. The orientation may be dead-reckoned.
| DtVector DtArticulatedPart::orientationRate | ( | ) | const [inline] |
Helper to get orientation. The orientation may be dead-reckoned.
| virtual unsigned int DtArticulatedPart::parameterCount | ( | ) | const [virtual] |
Get the number of set parameters.
The count will be between 0-32.
| 0 | There are no parameter set. |
| virtual unsigned int DtArticulatedPart::partType | ( | ) | const [virtual] |
Get this articulated part type.
| virtual int DtArticulatedPart::partTypeAttachedTo | ( | ) | const [virtual] |
Get the part type id attached too.
| virtual void DtArticulatedPart::printDataToStream | ( | std::ostream & | str | ) | const [virtual] |
Print the part data to the specified stream.
| virtual void DtArticulatedPart::setApproximating | ( | bool | deadreckoning | ) | [virtual] |
Set whether we are deadreckoning the values.
| static void DtArticulatedPart::setApproximatingEnabledFlag | ( | bool | enabled | ) | [static] |
| virtual void DtArticulatedPart::setAttachedToPartIndex | ( | unsigned int | index | ) | [virtual] |
Set an index for the attached to part. This should only be called by the Collection.
| virtual void DtArticulatedPart::setClock | ( | DtClock * | clock | ) | [virtual] |
Set the clock to use with approximating using the simTime.
| clock | may be either a valid clock or a NULL pointer. The clock may not be deallocated before articulated part. |
| void DtArticulatedPart::setOrientation | ( | const DtTaitBryan & | ori | ) | [inline] |
Helper to set the orientation.
| void DtArticulatedPart::setOrientationRate | ( | const DtVector & | oriRate | ) | [inline] |
Helper to set the orientation rate.
| virtual bool DtArticulatedPart::setParameter | ( | ParameterMetric | parameterMetric, |
| const Parameter & | parameter, | ||
| bool | setOnlyValue = true |
||
| ) | [virtual] |
Set the parameter.
Typically only the value is set parameter are copied. Typically only the decoder needs to set more than the value.
| Input | |
| parameterMetric | the specific parameter you wish to set. |
| parameter | the values you wish to set. |
| setOnlyValue | controls if we are setting only the input 'value' field <default> or also the 'change' and 'time' fields. |
| true | if the parameter was set. |
| false | if the parameter was not set. |
| bool DtArticulatedPart::setParameter | ( | ParameterMetric | parameterMetric, |
| float | value | ||
| ) | [inline] |
Set the parameter, set only the value.
| Input | |
| value | the value to set. |
| true | if the parameter was set. |
| false | if the parameter was not set. |
References DtArticulatedPart::Parameter::value.
| virtual void DtArticulatedPart::setPartType | ( | unsigned int | artPartType | ) | [virtual] |
Set the part type.
| virtual void DtArticulatedPart::setPartTypeAttachedTo | ( | int | attachedTo | ) | [virtual] |
Set the attached to part id.
| void DtArticulatedPart::setTranslation | ( | const DtVector & | trans | ) | [inline] |
Helper to set the translation.
| void DtArticulatedPart::setTranslationRate | ( | const DtVector & | transRate | ) | [inline] |
Helper to set the translation rate.
| DtVector DtArticulatedPart::translation | ( | ) | const [inline] |
Helper to get translation. The translation may be dead-reckoned.
| DtVector DtArticulatedPart::translation | ( | double | time | ) | const [inline] |
Helper to get translation. The translation may be dead-reckoned.
| DtVector DtArticulatedPart::translationRate | ( | ) | const [inline] |
Helper to get the translation rate.
| virtual void DtArticulatedPart::unsetAllParameters | ( | ) | [virtual] |
Clear all parameters. This is useful when decoding the complete 'state'.
| virtual void DtArticulatedPart::unsetParameter | ( | ParameterMetric | parameterMetric | ) | [virtual] |
Clear a parameter so it appears the parameter is not set. Calls to getParameter will fail.
bool DtArticulatedPart::myApproximatingFlag [protected] |
unsigned short DtArticulatedPart::myAttachedToPartIndex [protected] |
DtClock* DtArticulatedPart::myClock [protected] |
unsigned int DtArticulatedPart::myParameterMask [protected] |
std::vector<Parameter> DtArticulatedPart::myParameters [protected] |
unsigned int DtArticulatedPart::myPartType [protected] |
int DtArticulatedPart::myPartTypeAttachedTo [protected] |
bool DtArticulatedPart::theApproximatingEnabledFlag [static, protected] |