VR-Engage  2.2
Loading...
Searching...
No Matches
DtSceneObjectMimicUpdaterAgent.hpp
Go to the documentation of this file.
1/******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4******************************************************************************/
5
6//! \file DtSceneObjectMimicUpdaterAgent.hpp
7//! \brief Agent interface for the DtSceneObjectMimicUpdater that enables one scene object to mimic another
8//! \ingroup vreCommonComponents
9
10#pragma once
11
13#include <vrvCore/DtUniqueID.h>
14// *** Generated Code - Do Not Edit! ***
15// *** Created by dcgen ***
16
17
18#include <vrvCore/DtSceneObjectUpdaterAgent.hpp>
19
20namespace makVre
21{
22
24
25//! \brief Agent class for the scene object class: DtSceneObjectMimicUpdater
26//!
27//! This agent provides an interface to control a DtSceneObjectMimicUpdater, which allows
28//! one scene object to follow another's position and orientation with an optional offset.
29//! It is commonly used for attaching objects to others in a scene, such as weapons to characters
30//! or interior models to vehicles.
31class VRECOMMONCOMPONENTS_DLL DtSceneObjectMimicUpdaterAgent : public virtual makVrv::DtSceneObjectUpdaterAgent
32{
33public:
34 //! \brief Constructor for the DtSceneObjectMimicUpdaterAgent
36
37 //! \brief Static helper method to create an instance of this agent
38 //! \param sceneInterface The agent manager interface to register with
39 //! \param bDistribute Flag indicating if the agent should be distributed in networked scenarios
40 //! \return Pointer to the newly created agent instance
41 static DtSceneObjectMimicUpdaterAgent* create(makVrv::DtAgentManagerInterface& sceneInterface, bool bDistribute = true);
42
43 //! \brief Destructor for the DtSceneObjectMimicUpdaterAgent
45
46 //! \brief Attempt to find the actual object the agent is controlling
47 //! \return Pointer to the controlled DtSceneObjectMimicUpdater instance or nullptr if not found
48 //! \warning Any modifications to the actual object will NOT work when
49 //! using distributed rendering
51
52 //! \brief Const version of findObject()
53 //! \return Const pointer to the controlled DtSceneObjectMimicUpdater instance or nullptr if not found
55
56
57 //! \brief Sets the parent scene object that this mimic updater will follow
58 //! \param id Unique ID of the parent scene object to mimic
59 //!
60 //! The mimic updater will track the specified scene object, following its position
61 //! and orientation with the configured offset
62 virtual void setParentSceneObject(makVrv::DtUniqueID id) = 0;
63
64
65 //! \brief Sets the position offset from the parent scene object
66 //! \param offset Vector specifying the local-space offset from the parent scene object
67 //!
68 //! This offset is applied in the parent object's local space, then transformed to world space
69 //! when positioning the mimic object
70 virtual void setModelOffset(const DtVector& offset) = 0;
71
72
73protected:
74 //! \brief Internal method to find and cast the object to DtSceneObjectMimicUpdater
75 //! \return Pointer to the controlled DtSceneObjectMimicUpdater or nullptr if not found
76 //!
77 //! This method is implemented by derived agent classes to properly locate and cast
78 //! the object being controlled
80};
81
82}
DtSceneObjectMimicUpdater * findObject()
Attempt to find the actual object the agent is controlling.
virtual ~DtSceneObjectMimicUpdaterAgent()
Destructor for the DtSceneObjectMimicUpdaterAgent.
virtual void setParentSceneObject(makVrv::DtUniqueID id)=0
Sets the parent scene object that this mimic updater will follow.
virtual void setModelOffset(const DtVector &offset)=0
Sets the position offset from the parent scene object.
const DtSceneObjectMimicUpdater * findObject() const
Const version of findObject()
static DtSceneObjectMimicUpdaterAgent * create(makVrv::DtAgentManagerInterface &sceneInterface, bool bDistribute=true)
Static helper method to create an instance of this agent.
DtSceneObjectMimicUpdaterAgent()
Constructor for the DtSceneObjectMimicUpdaterAgent.
virtual DtSceneObjectMimicUpdater * findObjectAsDtSceneObjectMimicUpdater()=0
Internal method to find and cast the object to DtSceneObjectMimicUpdater.
Scene object updater that mimics the position and orientation of another scene object.
Definition DtSceneObjectMimicUpdater.h:52
Defines export/import macros for the vreCommonComponents library.
#define VRECOMMONCOMPONENTS_DLL
DLL export/import macro for the vreCommonComponents library.
Definition export.h:28
Include export definitions for this library.
Definition glsVreMessageUtil.h:49