![]() |
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. More... | |
Public Member Functions | |
| DtArticulatedPart (DtClock *clock=0) | |
| CTOR. More... | |
| DtArticulatedPart (const DtArticulatedPart ©) | |
| Copy CTOR. More... | |
| DtArticulatedPart & | operator= (const DtArticulatedPart ©) |
| Assignment operator. More... | |
| virtual | ~DtArticulatedPart () |
| DTOR. More... | |
| bool | operator== (const DtArticulatedPart &other) const |
| Equality/Inequality operators. More... | |
| 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. More... | |
| virtual unsigned int | parameterCount () const |
| Get the number of set parameters. More... | |
| virtual int | partTypeAttachedTo () const |
| Get the part type id attached too. More... | |
| virtual void | setPartTypeAttachedTo (int attachedTo) |
| Set the attached to part id. More... | |
| virtual unsigned short | attachedToPartIndex () const |
| Get an index for the attached to part. More... | |
| virtual void | setAttachedToPartIndex (unsigned int index) |
| Set an index for the attached to part. More... | |
| virtual unsigned int | partType () const |
| Get this articulated part type. More... | |
| virtual void | setPartType (unsigned int artPartType) |
| Set the part type. More... | |
| virtual void | getParameterMetrics (std::vector< ParameterMetric > &metrics) const |
| Get the set parameter metrics by adding the parameter metrics to the provided vector. More... | |
| virtual bool | setParameter (ParameterMetric parameterMetric, const Parameter ¶meter, bool setOnlyValue=true) |
| Set the parameter. More... | |
| bool | setParameter (ParameterMetric parameterMetric, float value) |
| Set the parameter, set only the value. More... | |
| virtual bool | getParameter (ParameterMetric parameterMetric, Parameter ¶meter) const |
| Get the parameter written into the provided parameter. More... | |
| virtual float | getParameterValue (ParameterMetric parameterMetric, double time) const |
| Get a parameter value. More... | |
| float | getParameterValue (ParameterMetric parameterMetric) const |
| Get the parameter value using the internal clock. More... | |
| virtual void | unsetParameter (ParameterMetric parameterMetric) |
| Clear a parameter so it appears the parameter is not set. Calls to getParameter will fail. More... | |
| virtual void | unsetAllParameters () |
| Clear all parameters. This is useful when decoding the complete 'state'. More... | |
| virtual void | incrementChange (ParameterMetric parameterMetric) |
| Increment the change parameter for the metric. More... | |
| virtual bool | approximating () const |
| Are we deadreckoning the values. More... | |
| virtual void | setApproximating (bool deadreckoning) |
| Set whether we are deadreckoning the values. More... | |
| virtual void | setClock (DtClock *clock) |
| Set the clock to use with approximating using the simTime. More... | |
| virtual void | printDataToStream (std::ostream &str) const |
| Print the part data to the specified stream. More... | |
| DtClock * | clock () |
| Get the clock. More... | |
| const DtClock * | clock () const |
| Get the clock. More... | |
| bool | isParameterSet (ParameterMetric parameterMetric) const |
| Check to see if a parameter is set. More... | |
| bool | isParameterMetricValid (ParameterMetric parameterMetric) const |
| Check to see if a parameter metric is valid. More... | |
| bool | isParameterApproximated (ParameterMetric parameterMetric) const |
| Check to is if parameter is approximated. More... | |
| unsigned int | getParameterRateMetric (ParameterMetric parameterMetric) const |
| Get the parameter metric for a parameter's rate. More... | |
| bool | hasTranslation () const |
| Helper function to check to see if translation has been set. More... | |
| DtVector | translation () const |
| Helper to get translation. The translation may be dead-reckoned. More... | |
| DtVector | translation (double time) const |
| Helper to get translation. The translation may be dead-reckoned. More... | |
| bool | getTranslation (DtVector &vec) const |
| Helper to get translation. The translation may be dead-reckoned. More... | |
| bool | getTranslation (DtVector &vec, double time) const |
| Helper to get translation. The translation may be dead-reckoned. More... | |
| void | setTranslation (const DtVector &trans) |
| Helper to set the translation. More... | |
| bool | hasTranslationRate () const |
| Helper function to check to see if translation rate has been set. More... | |
| DtVector | translationRate () const |
| Helper to get the translation rate. More... | |
| bool | getTranslationRate (DtVector &vec) const |
| Helper to get the translation rate. More... | |
| void | setTranslationRate (const DtVector &transRate) |
| Helper to set the translation rate. More... | |
| bool | hasOrientation () const |
| Helper function to check to see if orientation has been set. More... | |
| DtTaitBryan | orientation () const |
| Helper to get the orientation. More... | |
| DtTaitBryan | orientation (double time) const |
| Helper to get orientation. The orientation may be dead-reckoned. More... | |
| bool | getOrientation (DtTaitBryan &ori) const |
| Helper to get the orientation. More... | |
| bool | getOrientation (DtTaitBryan &ori, double time) const |
| Helper to get the orientation if it is set. More... | |
| void | setOrientation (const DtTaitBryan &ori) |
| Helper to set the orientation. More... | |
| bool | hasOrientationRate () const |
| Helper function to check to see if orientation has been set. More... | |
| DtVector | orientationRate () const |
| Helper to get orientation. The orientation may be dead-reckoned. More... | |
| bool | getOrientationRate (DtVector &oriRate) const |
| Helper to get the orientation. More... | |
| void | setOrientationRate (const DtVector &oriRate) |
| Helper to set the orientation rate. More... | |
Static Public Member Functions | |
| static unsigned int | decodeArtPartType (unsigned int type) |
| Get the part class from the part and parameter value. More... | |
| static unsigned int | decodeArtPartClass (unsigned int type) |
| Get the part class from the part and parameter value. More... | |
| static unsigned char | decodeArtPartParamMetric (unsigned int type) |
| Get the parameter metric from the part and parameter value. More... | |
| static unsigned int | encodeArtPartParamType (unsigned int partClass, unsigned char paramMetric) |
| Encode the part class and parameter metric into a part type. More... | |
| 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.
Get the part class from the part and parameter value.
|
inlinestatic |
Get the parameter metric from the part and parameter value.
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 is the actual index of the array of parts in DIS or HLA sent over the network. If you don't know the index of the array, setPartTypeAttachedTo lets you attach directly to a specific type of item. If you want to attach to the entity, set this to 0.
|
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 is the type of part of the thing to attach to, as specified by setPartType. If you want to attach to the entity, set this to -1.
|
inline |
Helper to set the translation.
|
inline |
Helper to set the translation rate.
|
inline |
Helper to get translation. The translation may be dead-reckoned.
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 |