|
VR-Engage
2.2
|
This agent provides an interface to control a DtSceneObjectMimicUpdater, which allows one scene object to follow another's position and orientation with an optional offset. It is commonly used for attaching objects to others in a scene, such as weapons to characters or interior models to vehicles.
#include <DtSceneObjectMimicUpdaterAgent.hpp>
Public Member Functions | |
| DtSceneObjectMimicUpdaterAgent () | |
| virtual | ~DtSceneObjectMimicUpdaterAgent () |
| DtSceneObjectMimicUpdater * | findObject () |
| const DtSceneObjectMimicUpdater * | findObject () const |
| virtual void | setParentSceneObject (makVrv::DtUniqueID id)=0 |
| virtual void | setModelOffset (const DtVector &offset)=0 |
Static Public Member Functions | |
| static DtSceneObjectMimicUpdaterAgent * | create (makVrv::DtAgentManagerInterface &sceneInterface, bool bDistribute=true) |
Protected Member Functions | |
| virtual DtSceneObjectMimicUpdater * | findObjectAsDtSceneObjectMimicUpdater ()=0 |
| makVre::DtSceneObjectMimicUpdaterAgent::DtSceneObjectMimicUpdaterAgent | ( | ) |
Constructor for the DtSceneObjectMimicUpdaterAgent.
Referenced by create().
|
virtual |
Destructor for the DtSceneObjectMimicUpdaterAgent.
|
static |
Static helper method to create an instance of this agent.
| sceneInterface | The agent manager interface to register with |
| bDistribute | Flag indicating if the agent should be distributed in networked scenarios |
References DtSceneObjectMimicUpdaterAgent().
| DtSceneObjectMimicUpdater * makVre::DtSceneObjectMimicUpdaterAgent::findObject | ( | ) |
Attempt to find the actual object the agent is controlling.
| const DtSceneObjectMimicUpdater * makVre::DtSceneObjectMimicUpdaterAgent::findObject | ( | ) | const |
Const version of findObject()
|
pure virtual |
Sets the parent scene object that this mimic updater will follow.
| id | Unique ID of the parent scene object to mimic |
The mimic updater will track the specified scene object, following its position and orientation with the configured offset
Implemented in makVre::DtSceneObjectMimicUpdaterAgentImplementation.
|
pure virtual |
Sets the position offset from the parent scene object.
| offset | Vector specifying the local-space offset from the parent scene object |
This offset is applied in the parent object's local space, then transformed to world space when positioning the mimic object
Implemented in makVre::DtSceneObjectMimicUpdaterAgentImplementation.
|
protectedpure virtual |
Internal method to find and cast the object to DtSceneObjectMimicUpdater.
This method is implemented by derived agent classes to properly locate and cast the object being controlled
Implemented in makVre::DtFpsFirstPersonUpdaterAgentImplementation, and makVre::DtSceneObjectMimicUpdaterAgentImplementation.