VR-Engage  2.2
Loading...
Searching...
No Matches
kinetic.h
Go to the documentation of this file.
1/******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4******************************************************************************/
5
6//! \file kinetic.h
7//! \brief Defines the DtKinetic class for representing entity kinetic state
8//!
9//! This file contains the DtKinetic class which encapsulates the complete
10//! kinetic state of a simulation entity, including position, orientation,
11//! linear and angular velocities, and acceleration. This information is used
12//! for dead reckoning, physics calculations, and visualization.
13
14#pragma once
15
17
18#include <matrix/vlVector.h>
19#include <matrix/vlTaitBryan.h>
20
21namespace makVre
22{
23//! \brief Class representing the complete kinetic state of an entity
24//!
25//! DtKinetic encapsulates all kinetic information about a simulation entity,
26//! including its position, orientation, velocities, and acceleration. This data
27//! is used for various simulation purposes such as:
28//! - Dead reckoning to estimate entity positions between network updates
29//! - Physics calculations for collision detection and response
30//! - Visual representation for accurate entity placement and movement
31//!
32//! The class provides comparison operators to detect when kinetic state changes.
34{
35public:
36 //! \brief Default constructor
37 //!
38 //! Creates a new kinetic state with default values (zero for all vectors).
40
41 //! \brief Virtual destructor
42 //!
43 //! Ensures proper cleanup of derived kinetic classes if any.
44 virtual ~DtKinetic();
45
46 //! \brief Unique identifier for this entity
47 //!
48 //! Integer ID that uniquely identifies this entity within the simulation.
49 int myId;
50
51 //! \brief Identifier of the parent entity
52 //!
53 //! If this entity is attached to a parent (e.g., a component of a larger entity),
54 //! this field contains the parent's ID. Zero or negative values indicate no parent.
56
57 //! \brief Current position vector
58 //!
59 //! The entity's position in 3D space, typically expressed in geocentric coordinates.
60 DtVector myPosition;
61
62 //! \brief Current velocity vector
63 //!
64 //! The entity's linear velocity in meters per second.
65 DtVector32 myVelocity;
66
67 //! \brief Current acceleration vector
68 //!
69 //! The entity's linear acceleration in meters per second squared.
70 DtVector32 myAcceleration;
71
72 //! \brief Current orientation
73 //!
74 //! The entity's orientation in 3D space, represented as Tait-Bryan angles
75 //! (roll, pitch, yaw).
76 DtTaitBryan myOrientation;
77
78 //! \brief Current rotational velocity
79 //!
80 //! The entity's angular velocity in radians per second around each axis.
82
83 //! \brief Equality comparison operator
84 //! \param other The other kinetic state to compare with
85 //! \return True if all kinetic properties are equal, false otherwise
86 //!
87 //! Compares this kinetic state with another and returns true only if
88 //! all properties (position, velocity, etc.) are equal. This is used to
89 //! detect when an entity's state has changed.
90 bool operator==(const DtKinetic& other) const;
91
92 //! \brief Inequality comparison operator
93 //! \param other The other kinetic state to compare with
94 //! \return True if any kinetic property differs, false if all are equal
95 //!
96 //! Compares this kinetic state with another and returns true if any
97 //! property differs. This is the logical inverse of the equality operator.
98 bool operator!=(const DtKinetic& other) const;
99};
100
101} // namespace makVre
DtVector32 myVelocity
Current velocity vector.
Definition kinetic.h:65
bool operator==(const DtKinetic &other) const
Equality comparison operator.
DtVector32 myAcceleration
Current acceleration vector.
Definition kinetic.h:70
DtKinetic()
Default constructor.
DtVector32 myRotationVelocity
Current rotational velocity.
Definition kinetic.h:81
DtTaitBryan myOrientation
Current orientation.
Definition kinetic.h:76
virtual ~DtKinetic()
Virtual destructor.
int myId
Unique identifier for this entity.
Definition kinetic.h:49
bool operator!=(const DtKinetic &other) const
Inequality comparison operator.
DtVector myPosition
Current position vector.
Definition kinetic.h:60
int myParentId
Identifier of the parent entity.
Definition kinetic.h:55
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
Include export definitions for this library.
Definition glsVreMessageUtil.h:49