VR-Engage  2.3
Loading...
Searching...
No Matches
vreRotaryWingMoveToController.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2026 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6#pragma once
7
10
11#include <vrfmodel/rotaryWingMoveToControllerComponent.h>
12
13namespace makVre
14{
15const char DtVreRotaryWingMoveToControllerType[] = "vre-rotary-wing-move-to-controller";
16
17//! \brief VRE-specific rotary-wing move-to controller with facing-target support.
18//!
19//! This class derives from DtRotaryWingMoveToControllerComponent to include a target
20//! facing behavior during move-to motion. The base move-to controller doesn't include
21//! heading specification during move-to-location tasks.
23 : public DtVreSimComponent<DtRotaryWingMoveToControllerComponent>
24{
25public:
26 DtVreRotaryWingMoveToController(const DtString& name,
27 DtLocalObject* owner,
28 DtSimulationServices* simManager,
29 DtComponentDescriptor* desc = 0,
30 DtReaderWriterRegistry* parentRegistry = 0);
31
33
34 virtual const char* type() const override;
35
36 static DtSimComponent* creator(const DtString& name,
37 DtLocalObject* owner,
38 DtSimulationServices* simManager,
39 DtComponentDescriptor* desc = 0,
40 DtReaderWriterRegistry* parentRegistry = 0);
41
42protected:
43 //! \brief Overrides base function to apply facing-target heading.
44 //!
45 //! The base move-to controller computes translational guidance and may leave
46 //! heading to default behavior. This override runs after base guidance,
47 //! resolves the active facing target from state properties, and forces desired
48 //! heading/selector so move-to-location can maintain orientation toward that
49 //! target (object target has priority over geocentric target).
50 virtual void pilotProperties() override;
51
52private:
53 //! \brief Resolves the world-space facing point from move-to facing state properties.
54 //! \param worldFacingPoint Output world-space point to face.
55 //! \return True if a usable facing point was resolved, false otherwise.
56 //!
57 //! Resolution order is:
58 //! 1) MoveToFacingTargetObject (DtRwString UUID) - if valid/resolved, uses target object position.
59 //! 2) MoveToFacingGeocentric (DtRwVector geocentric XYZ) - used as fallback.
60 bool resolveFacingPointWorld(DtVector& worldFacingPoint) const;
61};
62
63} // namespace makVre
bool resolveFacingPointWorld(DtVector &worldFacingPoint) const
Resolves the world-space facing point from move-to facing state properties.
virtual ~DtVreRotaryWingMoveToController() override
virtual void pilotProperties() override
Overrides base function to apply facing-target heading.
virtual const char * type() const override
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
DtVreRotaryWingMoveToController(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
DtVreSimComponent(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Definition vreSimComponent.h:63
Defines export macros for the vreVrfmodel library.
#define VREVRFMODEL_DLL
Definition export.h:22
!
Definition glsVreMessageUtil.h:50
const char DtVreRotaryWingMoveToControllerType[]
Definition vreRotaryWingMoveToController.h:15
Base template class for VR-Engage simulation components.