VR-Engage  2.2
Loading...
Searching...
No Matches
vrfObjectStateRepositoryUtil.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vrfObjectStateRepositoryUtil.h
7//! \ingroup vreVrfobjcore
8//! \brief Utility functions for VRF object state repositories
9//!
10//! This file contains utility functions associated with the DtVrfObjectStateRepository class
11//! and related functionality. It provides helpers for determining player control status
12//! of simulation entities.
13
15
16#include <string>
17
18class DtSimObject;
19class DtLocalObjectManager;
20
21namespace makVre
22{
23//! \brief Component name for the movement chooser
24//!
25//! Constant string defining the component name for the movement chooser system.
26//! Used for component lookups when determining player control status.
27const char DtMovementChooserComponentName[] = "base-system.movement.movement-chooser";
28
29//! \brief Checks if an entity is under player control
30//! \param stateRep Reference to the simulation object to check
31//! \return True if the entity is currently under player control in any role, false otherwise
32//!
33//! This function determines whether a simulation entity is currently being controlled
34//! by a player in any role. It checks the entity's components to see if a player has
35//! assumed control in roles such as driver, gunner, commander, etc.
36VREVRFOBJCORE_DLL bool isPlayerControlled(const DtSimObject& stateRep);
37
38//! \brief Checks if an entity is under player control in a specific role
39//! \param stateRep Reference to the simulation object to check
40//! \param role The specific role to check for (e.g., "Driver", "Gunner", "Commander")
41//! \return True if the entity is currently controlled by a player in the specified role, false otherwise
42//!
43//! This function determines whether a simulation entity is currently being controlled
44//! by a player in the specified role. It checks the entity's components to see if
45//! a player has assumed control in the given role.
46VREVRFOBJCORE_DLL bool isPlayerControlledAs(const DtSimObject& stateRep, std::string role);
47
48VREVRFOBJCORE_DLL void setLocalObjectManager(DtLocalObjectManager* mgr);
50} // namespace makVre
Export macros for the VREngage Object Core library.
#define VREVRFOBJCORE_DLL
Platform-specific DLL export/import declaration.
Definition export.h:27
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
VREVRFOBJCORE_DLL DtLocalObjectManager * getLocalObjectManager()
const char DtMovementChooserComponentName[]
Component name for the movement chooser.
Definition vrfObjectStateRepositoryUtil.h:27
VREVRFOBJCORE_DLL bool isPlayerControlledAs(const DtSimObject &stateRep, std::string role)
Checks if an entity is under player control in a specific role.
VREVRFOBJCORE_DLL bool isPlayerControlled(const DtSimObject &stateRep)
Checks if an entity is under player control.
VREVRFOBJCORE_DLL void setLocalObjectManager(DtLocalObjectManager *mgr)