![]() |
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. | |
| virtual void | setAttachedToPartIndex (unsigned int index) |
| Set an index for the attached to part. | |
| 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 class from the part and parameter value. | |
| static unsigned int | decodeArtPartClass (unsigned int type) |
| Get the part class 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 partClass, unsigned char paramMetric) |
| Encode the part class and parameter metric into a part type. | |
| 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 |
DTOR.
|
virtual |
Are we deadreckoning the values.
|
static |
|
virtual |
Get an index for the attached to part.
| DtClock* DtArticulatedPart::clock | ( | ) |
Get the clock.
| const DtClock* DtArticulatedPart::clock | ( | ) | const |
Get the clock.
|
inlinestatic |
Get the part class from the part and parameter value.
|
inlinestatic |
Get the parameter metric from the part and parameter value.
|
inlinestatic |
Get the part class from the part and parameter value.
Deprecated - use decodeArtPartClass
|
inlinestatic |
Encode the part class and parameter metric into a part type.
|
inline |
Helper to get the orientation.
|
inline |
Helper to get the orientation if it is set.
Helper to get the orientation.
|
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 |
Get the set parameter metrics by adding the parameter metrics to the provided vector.
|
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 |
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. |
|
inline |
Get the parameter value using the internal clock.
| Input | |
| parameterMetric | the metric to lookup. |
Helper to get translation. The translation may be dead-reckoned.
Helper to get translation. The translation may be dead-reckoned.
Helper to get the translation rate.
|
inline |
Helper function to check to see if orientation has been set.
|
inline |
Helper function to check to see if orientation has been set.
|
virtual |
Do the two parts have the same parameter metrics set (the values may be different.
|
inline |
Helper function to check to see if translation has been set.
|
inline |
Helper function to check to see if translation rate has been set.
|
virtual |
Increment the change parameter for the metric.
|
inline |
Check to is if parameter is approximated.
|
inline |
Check to see if a parameter metric is valid.
|
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.
|
inline |
Helper to get the orientation.
|
inline |
Helper to get orientation. The orientation may be dead-reckoned.
|
inline |
Helper to get orientation. The orientation may be dead-reckoned.
|
virtual |
Get the number of set parameters.
The count will be between 0-32.
| 0 | There are no parameter set. |
|
virtual |
Get this articulated part type.
|
virtual |
Get the part type id attached too.
|
virtual |
Print the part data to the specified stream.
|
virtual |
Set whether we are deadreckoning the values.
|
static |
|
virtual |
Set an index for the attached to part.
This method will only be called by the Collection to protect against missing parts and cycles.
|
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. |
|
inline |
Helper to set the orientation.
|
inline |
Helper to set the orientation rate.
|
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. |
|
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 |
Set the part type.
|
virtual |
Set the attached to part id.
This method will only be called by the Collection to protect against missing parts and cycles.
|
inline |
Helper to set the translation.
|
inline |
Helper to set the translation rate.
|
inline |
Helper to get translation. The translation may be dead-reckoned.
|
inline |
Helper to get translation. The translation may be dead-reckoned.
|
inline |
Helper to get the translation rate.
|
virtual |
Clear all parameters. This is useful when decoding the complete 'state'.
|
virtual |
Clear a parameter so it appears the parameter is not set. Calls to getParameter will fail.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |