![]() |
VR-Link API Documentation for HLA 1.3
|
An attached part is an entity that is attached to another entity.
For example, a missile could be attached to a launcher. DtEntityStateRepository::attPartList() returns a pointer to a protocol-independent DtAttachedPartCollection (defined in attachedPartCollection.h). DtAttachedPartCollection works similarly to DtArticulatedPartCollection. You can use DtAttachedPartCollection's inspectors to find out the current state of a reflected entity's attached parts. You can use its mutators to set the state of a locally simulated entity's attached parts.
For example:
// Create the publisher, and get its ESR's attached parts list DtEntityPublisher pub(...); DtEntityStateRepository* esr = pub.esr(); DtAttachedPartListDtAttachedPartCollection* attList = esr->attPartList(); // Add a single attached part, a sidewinder missile attached to // station number 15. (Station numbers are model-specific.) DtAttachedPart& newPart = attList->getPart(15); newPart->setEntityType(DtEntityType(2, 1, 225, 1, 1, 0, 0));
[<< Articulated Parts] [Home] [Using Independent VR-Link Objects in Multiple Threads >>]