VR-Link C# API Documentation
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
4.11 - Attached Parts

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 >>]


Document ID: Generated on Wed Jan 7 13:31:29 EST 2015 from SVN revision 149162
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)