VR-Engage  2.3
Loading...
Searching...
No Matches
vortexMovementPSR.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2024 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vortexMovementPSR.h
7//! \brief Process state repository for the Vortex movement actuator
8//! \ingroup vreVrfVortex
9
10#pragma once
11
12#include "vreVrfVortex/export.h"
13#include <vrfobjcore/vrfProcessStateRepository.h>
14#include <readerWriter/rwBoolean.h>
15
16namespace makVre
17{
18//! \brief Default name for the Vortex movement PSR
19const char DtVortexMovementPSRDefaultName[] = "vortex-movement-process-state-repository-default";
20
21//! \brief Type identifier for the Vortex movement PSR
22const char DtVortexMovementPSRType[] = "vortex-movement-psr";
23
24//! \brief Process state repository for the Vortex movement actuator
25//!
26//! Maintains state data for the DtVortexMovementActuator. This state is saved
27//! as part of the scenario, ensuring persistence between scenario loads.
28//! The primary state maintained is whether high-fidelity collision physics should
29//! be used for stationary CGF entities.
30class VREVRFVORTEX_DLL DtVortexMovementPSR : public DtVrfProcessStateRepository
31{
32public:
33 //! \brief Constructor
34 //!
35 //! Creates a process state repository associated with a VR-Forces object.
36 //!
37 //! \param vrfObject The VR-Forces object this repository is associated with
38 //! \param rwName Optional name for the reader/writer
39 //! \param parentRegistry Optional parent registry
40 DtVortexMovementPSR(DtLocalObject* vrfObject,
41 const DtString& rwName = DtString::nullString(),
42 DtReaderWriterRegistry* parentRegistry = 0);
43
44 //! \brief Copy constructor
45 //!
46 //! Creates a new process state repository as a copy of an existing one.
47 //!
48 //! \param orig The original repository to copy
49 //! \param rwName Optional name for the reader/writer
50 //! \param parentRegistry Optional parent registry
52 const DtString& rwName = DtString::nullString(),
53 DtReaderWriterRegistry* parentRegistry = 0);
54
55 //! \brief Destructor
56 virtual ~DtVortexMovementPSR() override;
57
58 //! \brief Assignment operator
59 //!
60 //! Copies the state from another repository to this one.
61 //!
62 //! \param orig The original repository to copy from
63 //! \return Reference to this repository
65
66 //! \brief Creates a clone of this repository
67 //!
68 //! \param rwName Optional name for the reader/writer
69 //! \param parentRegistry Optional parent registry
70 //! \return Pointer to the new repository
71 virtual DtVrfProcessStateRepository* clone(const DtString& rwName = DtString::nullString(),
72 DtReaderWriterRegistry* parentRegistry = 0) const override;
73
74 //! \brief Gets the type of this repository
75 //!
76 //! \return DtVortexMovementPSRType
77 virtual DtString type() const override;
78
79 //! \brief Sets whether high-fidelity collisions should be used for stationary CGF entities
80 //!
81 //! Controls whether entities should model high-fidelity Vortex collisions while in a CGF state
82 //! but not currently executing any movement tasks.
83 //!
84 //! \param value True to enable high-fidelity collisions, false to disable
86
87 //! \brief Checks if high-fidelity collisions should be used for stationary CGF entities
88 //!
89 //! \return True if high-fidelity collisions are enabled, false otherwise
91
92 //! \brief Factory method to create new instances of this class
93 //!
94 //! \param rwName Name for the reader/writer
95 //! \param vrfObject The VR-Forces object to associate with
96 //! \param parentRegistry Optional parent registry
97 //! \return Pointer to the new repository
98 static DtVrfProcessStateRepository* creator(
99 const DtString& rwName, DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
100
101protected:
102 DtRwBoolean
103 myUseHiFiCollisionsInStationaryCgfState; //!< Flag for using high-fidelity collisions in stationary CGF state
104};
105} // namespace makVre
DtVortexMovementPSR(const DtVortexMovementPSR &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
Copy constructor.
DtVortexMovementPSR(DtLocalObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
Constructor.
DtRwBoolean myUseHiFiCollisionsInStationaryCgfState
Flag for using high-fidelity collisions in stationary CGF state.
Definition vortexMovementPSR.h:103
virtual bool useHiFiCollisionsInStationaryCgfState() const
Checks if high-fidelity collisions should be used for stationary CGF entities.
virtual void setUseHiFiCollisionsInStationaryCgfState(bool value)
Sets whether high-fidelity collisions should be used for stationary CGF entities.
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const override
Creates a clone of this repository.
virtual DtString type() const override
Gets the type of this repository.
DtVortexMovementPSR & operator=(const DtVortexMovementPSR &orig)
Assignment operator.
static DtVrfProcessStateRepository * creator(const DtString &rwName, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
Factory method to create new instances of this class.
virtual ~DtVortexMovementPSR() override
Destructor.
Export macros for the VR-Forces Vortex extension library.
#define VREVRFVORTEX_DLL
Export macro for non-Windows platforms.
Definition export.h:30
!
Definition glsVreMessageUtil.h:50
const char DtVortexMovementPSRDefaultName[]
Default name for the Vortex movement PSR.
Definition vortexMovementPSR.h:19
const char DtVortexMovementPSRType[]
Type identifier for the Vortex movement PSR.
Definition vortexMovementPSR.h:22