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 Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)