![]() |
VR-Link API Documentation for HLA 1.3
|
This file provides a declaration of the class DtPhysicalEntityDecoder. More...
Go to the source code of this file.
Classes | |
| class | DtPhysicalEntityDecoder |
| class DtPhysicalEntityDecoder: More... | |
Defines | |
| #define | DtDEFINE_SIMPLE_PHYS_ENTITY_ATTR_DECODER_WITH_CAST(attrName, netType, mutator, castExpr) |
| These macros are used to define simple attribute decoder functions (members of a derived DtHlaStateDecoder that decode individual attributes). | |
| #define | DtDEFINE_SIMPLE_PHYS_ENTITY_ATTR_DECODER(attrName, netType, inspector) |
| #define | DtDEFINE_LIGHT_ATTR_DECODER(decClass, attrName, arg1) |
This file provides a declaration of the class DtPhysicalEntityDecoder.
| #define DtDEFINE_LIGHT_ATTR_DECODER | ( | decClass, | |
| attrName, | |||
| arg1 | |||
| ) |
void decClass::decode##attrName( \ DtEntityStateRepository* stateRep, \ const RTI::AttributeHandleValuePairSet& attrs, \ int pairSetIndex) \ { \ RTI::ULong length = attrs.getValueLength(pairSetIndex); \ if (length > sizeof(DtNetBoolean)) \ { \ DtWarn("Size of value decoded from RTI update for attribute %s (%d)\n", \ #attrName, length); \ DtWarn(" is larger than size of %s (%d)\n", "DtNetBoolean", sizeof(DtNetBoolean)); \ } \ DtNetBoolean netVal; \ attrs.getValue(pairSetIndex, (char *) &netVal, length); \ stateRep->setLightState(arg1, (bool) (DtU32) netVal); \ }
| #define DtDEFINE_SIMPLE_PHYS_ENTITY_ATTR_DECODER | ( | attrName, | |
| netType, | |||
| inspector | |||
| ) |
DtDEFINE_SIMPLE_PHYS_ENTITY_ATTR_DECODER_WITH_CAST( \ attrName, netType, inspector, (netType))
| #define DtDEFINE_SIMPLE_PHYS_ENTITY_ATTR_DECODER_WITH_CAST | ( | attrName, | |
| netType, | |||
| mutator, | |||
| castExpr | |||
| ) |
DtDEFINE_SIMPLE_ATTR_DECODER_WITH_CAST( \ DtPhysicalEntityDecoder, DtEntityStateRepository, \ attrName, netType, mutator, castExpr)
These macros are used to define simple attribute decoder functions (members of a derived DtHlaStateDecoder that decode individual attributes).
The simple decoding is just to convert the value pulled out of the ahvps to a host type using the cast expression castExpr, and pass it to the mutator function.