VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rotaryWingFlyIntoController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
15 
16 #pragma once
19 
20 class DtCrashIntoTask;
21 
29 
35 
42 
45 {
46 
47 public:
48 
52  DtLocalObject* owner,
53  DtSimulationServices* simManager,
54  DtComponentDescriptor* desc = 0,
55  DtReaderWriterRegistry* parentRegistry = 0);
56 
58  virtual ~DtRotaryWingFlyIntoController() override;
59 
62  virtual const char* type() const override;
63 
67  virtual void setComponentDescriptor(DtComponentDescriptor* desc) override;
68 
70  virtual void registerTaskMsgCallbacks() override;
71 
75  static DtSimComponent * creator(const DtString& name,
76  DtLocalObject* owner,
77  DtSimulationServices* simManager,
78  DtComponentDescriptor* desc = 0,
79  DtReaderWriterRegistry* parentRegistry = 0);
80 
82  static void crashIntoCallback(DtSimMessage* msg, void* usr);
83 
87  virtual void processCrashInto(DtSimMessage* msg);
88 
92  virtual void processCrashIntoObject(DtCrashIntoTask* crashTask);
93 
97  virtual void processCrashIntoLocation(DtCrashIntoTask* crashTask);
98 
99 protected:
100 
107  virtual void tick() override;
108 
110  virtual void updateTaskVisualizations() override;
111 
113  virtual void pilotProperties() override;
114 
115  virtual DtVector computeVelocityControl(DtVector& desiredPosition) override;
116 
117  virtual void getDesiredPosition(DtVector& desiredPosition) override;
118 
125  void updateCrashIntoObjectAimingPoint();
126 
128  bool isInDirectFlightPhase();
129 
132  void handleNotifyPilot();
133 
134  void notifyPilot(bool enable);
135 
136  virtual void clearTask() override;
137 
138 protected:
145  bool hasNotifiedPilot = false;
146 
147 private:
154 };
155 
DtVector myCrashIntoWorldAimingPoint
The geocentric aiming point for crash-into-object logic.
Definition: rotaryWingFlyIntoController.h:144
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtRotaryWingFlyIntoControllerDescriptor; descriptor for the DtRotaryWingFlyIntoControllerDescriptor c...
Definition: rotaryWingFlyIntoControllerDescriptor.h:24
virtual const char * type() const override
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtCrashIntoTask is a task message intended to order an entity to manuver itself to crash directly int...
Definition: crashIntoTask.h:22
virtual void tick() override
Sets the desired position and velocity for use by the parent controller, then calls the parent's tick...
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
DtRotaryWingFlyIntoControllerDescriptor * myDescriptor
Definition: rotaryWingFlyIntoController.h:139
Definition: readerWriterRegistry.h:39
virtual void pilotProperties()
Sets the appropriate properties for the wait controller: The position selector is 1...
virtual void setComponentDescriptor(DtComponentDescriptor *componentDescriptor)
The component descriptor specified in the order of battle file or parameter file that was used to cre...
File: simMsg.h.
Definition: simMessage.h:35
virtual void clearTask() override
Overridden to deactivate the port group when this controller completes a task.
const DtRotaryWingMoveToControllerComponent & operator=(const DtRotaryWingMoveToControllerComponent &orig)
assignment operator; see comments on copy constructor!
virtual void updateTaskVisualizations() override
update visualizations
DtRotaryWingMoveToControllerComponent is a controller used to model the movement of a helicopter alon...
Definition: rotaryWingMoveToControllerComponent.h:27
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:97
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
DtFixedWingFlyIntoController is a controller that models flying into the ground for fixed-wing entiti...
Definition: rotaryWingFlyIntoController.h:44
virtual void getDesiredPosition(DtVector &desiredPosition)
Returns the position the helicopter wants to move to. In local coordinates (and not in parent coordin...
virtual void registerTaskMsgCallbacks() override
Overrides this so it can register its interest in MoveTo commands.
virtual DtVector computeVelocityControl(DtVector &desiredPosition)
Computes a velocity for the output velocity control port. If the entity is not embarked, this function computes the control point velocity from distance-moved/dT. Otherwise, returns 0. Max velocity returned <= max speed.
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)