VR-Engage  2.2
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, const DtString& rwName = DtString::nullString(),
41 DtReaderWriterRegistry* parentRegistry = 0);
42
43 //! \brief Copy constructor
44 //!
45 //! Creates a new process state repository as a copy of an existing one.
46 //!
47 //! \param orig The original repository to copy
48 //! \param rwName Optional name for the reader/writer
49 //! \param parentRegistry Optional parent registry
50 DtVortexMovementPSR(const DtVortexMovementPSR& orig, const DtString& rwName = DtString::nullString(),
51 DtReaderWriterRegistry* parentRegistry = 0);
52
53 //! \brief Destructor
54 virtual ~DtVortexMovementPSR() override;
55
56 //! \brief Assignment operator
57 //!
58 //! Copies the state from another repository to this one.
59 //!
60 //! \param orig The original repository to copy from
61 //! \return Reference to this repository
63
64 //! \brief Creates a clone of this repository
65 //!
66 //! \param rwName Optional name for the reader/writer
67 //! \param parentRegistry Optional parent registry
68 //! \return Pointer to the new repository
69 virtual DtVrfProcessStateRepository* clone(const DtString& rwName = DtString::nullString(),
70 DtReaderWriterRegistry* parentRegistry = 0) const override;
71
72 //! \brief Gets the type of this repository
73 //!
74 //! \return DtVortexMovementPSRType
75 virtual DtString type() const override;
76
77 //! \brief Sets whether high-fidelity collisions should be used for stationary CGF entities
78 //!
79 //! Controls whether entities should model high-fidelity Vortex collisions while in a CGF state
80 //! but not currently executing any movement tasks.
81 //!
82 //! \param value True to enable high-fidelity collisions, false to disable
84
85 //! \brief Checks if high-fidelity collisions should be used for stationary CGF entities
86 //!
87 //! \return True if high-fidelity collisions are enabled, false otherwise
89
90 //! \brief Factory method to create new instances of this class
91 //!
92 //! \param rwName Name for the reader/writer
93 //! \param vrfObject The VR-Forces object to associate with
94 //! \param parentRegistry Optional parent registry
95 //! \return Pointer to the new repository
96 static DtVrfProcessStateRepository* creator(
97 const DtString& rwName, DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
98
99protected:
100 DtRwBoolean
101 myUseHiFiCollisionsInStationaryCgfState; //!< Flag for using high-fidelity collisions in stationary CGF state
102};
103} // 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:101
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
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
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