VR-Link C# API Documentation
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events 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 Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)