19#include <vrfmodel/humanMovementActuator.h>
20#include <vrfobjcore/compositePredicate.h>
22class DtAnalogOutputPort;
68 DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
80 virtual const char*
type()
const override;
88 virtual bool init()
override;
96 virtual void tick()
override;
108 static DtSimComponent*
creator(
const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
109 DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
173 const DtVector& localPosition,
const DtSimObject*& hit,
const std::list<DtUUID>& additionalIgnore);
223 const DtVector& oldLocalPosition, DtVector& newLocalProjectedLocation,
double heightFraction = -1.0)
override;
265 double newFacingOrientation, DtDcm& newLocalOrientation, DtDcm& newLocalDirectionOfMovement,
266 DtVector& newLocalPosition)
override;
280 const DtVector& newLocalProjectedLocation,
281 DtVector& intersectionVec,
282 DtVector& bvCenterStartFromOldPos)
override;
296 const DtVector& newLocalProjectedLocation,
297 double heightFraction,
298 DtVector& intersectionVec,
299 DtVector& offsetFromOldPosition)
override;
361 double& newDesiredSpeed,
double& newMaxSpeed,
double desiredSpeed,
double maxSpeed)
const;
Human movement actuator descriptor with fatigue modeling for VREngage.
Definition vreHumanMovementActuatorDescriptor.h:33
DtRwInt * myMobilityHealth
Entity's mobility health value.
Definition vreHumanMovementActuator.h:420
virtual bool shouldFatigueChange(FatigueEffect &fatigueEffect, double desiredSpeed, double maxSpeed) const
Determines if and how fatigue should change based on movement.
virtual void tick() override
Updates the actuator state each simulation frame.
virtual bool canBlockMovement(const DtSimObject *object) const
Checks if this entity can block other entities' movement.
virtual void modulateDesiredSpeed(double &newDesiredSpeed, double &newMaxSpeed, double desiredSpeed)
Modulates the desired speed based on environmental factors.
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Factory method to create a new instance of this component.
static void setRestoredCallback(DtSimMessage *msg, void *usrData)
Callback for entity restoration events.
virtual double computeFatigueDecrease(FatigueEffect fatigueEffect) const
Computes the decrease in fatigue during recovery.
virtual bool checkForEntityCollisions() const override
Determines if entity collision checks should be performed.
virtual bool canIgnoreCollisionWith(const DtSimObject &hitObject) const
Determines if a specific object can be ignored for collision detection.
DtRwInt * myOverallHealth
Entity's overall health value.
Definition vreHumanMovementActuator.h:444
virtual DtChord movementChordAtHeight(const DtVector &oldLocalPosition, const DtVector &newLocalProjectedLocation, double heightFraction, DtVector &intersectionVec, DtVector &offsetFromOldPosition) override
Calculates a movement chord at a specific height fraction.
DtVreHumanMovementActuatorDescriptor * myVreHumanMovementDescriptor
Pointer to the human movement actuator descriptor.
Definition vreHumanMovementActuator.h:408
virtual ~DtVreHumanMovementActuator() override
Virtual destructor.
bool vrfObjectCheckIfMoveOntoEmbarked(const DtVector &localPosition, const DtSimObject *&hit, const std::list< DtUUID > &additionalIgnore)
Performs embarkation check against specific objects.
void processVreTerrainChangeNotification(const DtTerrainChangeNotificationInfo &terrainChangeInfo)
Processes terrain change notifications.
DtVreHumanMovementActuator & operator=(const DtVreHumanMovementActuator &orig)
Assignment operator (not implemented)
virtual void setRestored()
Handles entity restoration after damage.
virtual DtLifeformStaticPosture restrictPostureForTerrain(DtLifeformStaticPosture desiredPosture) override
Restricts posture based on terrain conditions.
virtual double computeFatigueIncrease(FatigueEffect fatigueEffect, double currentTopSpeed, double maxSpeed) const
Computes the increase in fatigue based on movement speed.
virtual bool checkForTerrainCollisions() const override
Determines if terrain collision checks should be performed.
virtual void computeAllHealthEffectsOnSpeed(double &newDesiredSpeed, double &newMaxSpeed, double desiredSpeed, double maxSpeed) const
Computes speed modifications based on all health effects.
virtual DtChord movementChord(const DtVector &oldLocalPosition, const DtVector &newLocalProjectedLocation, DtVector &intersectionVec, DtVector &bvCenterStartFromOldPos) override
Calculates a movement chord considering entity bounding volume.
DtVreHumanMovementActuator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Constructor.
DtVreHumanMovementActuator(const DtVreHumanMovementActuator &orig)
Copy constructor (not implemented)
static void vreTerrainChangeNotification(const DtTerrainChangeNotificationInfo &terrainChangeInfo, void *usr)
Callback for terrain change notifications.
DtRwReal * myPercentOfMaxSpeed
Entity's percentage of maximum speed.
Definition vreHumanMovementActuator.h:432
virtual bool init() override
Initializes the human movement actuator.
FatigueEffect
Enumeration of different fatigue modification rates.
Definition vreHumanMovementActuator.h:126
@ FatigueEffect_DecreaseHigh
Fast fatigue recovery.
Definition vreHumanMovementActuator.h:130
@ FatigueEffect_IncreaseHigh
Fast fatigue increase.
Definition vreHumanMovementActuator.h:133
@ FatigueEffect_None
No change in fatigue.
Definition vreHumanMovementActuator.h:127
@ FatigueEffect_IncreaseMedium
Medium fatigue increase.
Definition vreHumanMovementActuator.h:132
@ FatigueEffect_DecreaseLow
Slow fatigue recovery.
Definition vreHumanMovementActuator.h:128
@ FatigueEffect_IncreaseLow
Slow fatigue increase.
Definition vreHumanMovementActuator.h:131
@ FatigueEffect_DecreaseMedium
Medium fatigue recovery.
Definition vreHumanMovementActuator.h:129
DtRwInt * myFirepowerHealth
Entity's firepower health value.
Definition vreHumanMovementActuator.h:438
virtual void calculateOrientationAndPosition(const DtVector &newLocalProjectedLocation, double newHeading, double newFacingOrientation, DtDcm &newLocalOrientation, DtDcm &newLocalDirectionOfMovement, DtVector &newLocalPosition) override
Calculates new orientation and position for the entity.
virtual bool initializeAglPort() override
Initializes the Above Ground Level (AGL) port.
virtual bool checkIfMoveOntoEmbarked(const DtVector &localPosition) override
Checks if entity can embark onto another entity at the given position.
DtRwReal * myFatigue
Entity's fatigue value.
Definition vreHumanMovementActuator.h:426
DtVector myDesiredVelocity
Desired velocity vector for the entity.
Definition vreHumanMovementActuator.h:414
virtual void updateFatigue(FatigueEffect fatigueEffect, double newDesiredSpeed, double newMaxSpeed) const
Updates the entity's fatigue level.
virtual const char * type() const override
Gets the type identifier for this component.
virtual bool checkBlockedByTerrain(const DtVector &oldLocalPosition, DtVector &newLocalProjectedLocation, double heightFraction=-1.0) override
Checks if movement is blocked by terrain features.
virtual bool shouldAllowMovement()
Determines if movement should be allowed based on injury state.
virtual void setRadio(DtSimRadio *radio) override
Sets the radio receiver for simulation messages.
DtCompositePredicate myObjectsToCheckForMovementBlock
Predicate for movement blocking object types.
Definition vreHumanMovementActuator.h:450
virtual bool checkBlockedByEntities(const DtVector &oldLocalPosition, DtVector &newLocalProjectedLocation) override
Checks if movement is blocked by other entities.
DtVreSimComponent(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Definition vreSimComponent.h:54
Defines export macros for the vreVrfmodel library.
#define VREVRFMODEL_DLL
Definition export.h:22
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
const char DtVreHumanMovementActuatorType[]
Type identifier for the VRE human movement actuator component.
Definition vreHumanMovementActuator.h:29
Base template class for VR-Engage simulation components.