VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
missileMoveToControllerComponent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2024 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
14 
18 
19 #include <matrix/vlVector.h>
20 
21 class DtString;
23 class DtConstrainedAnalogPort;
24 class boolPort;
25 class DtSimMessage;
26 
27 
38 {
39 public:
40 
44  DtLocalObject* owner,
45  DtSimulationServices* simManager,
46  DtComponentDescriptor* desc = 0,
47  DtReaderWriterRegistry* parentRegistry = 0);
48 
50  virtual ~DtMissileMoveToControllerComponent() override;
51 
53  virtual void tick() override;
54 
57  virtual const char* type() const override;
58 
59 
62  virtual void setTargetPoint(const DtVector& targetPoint);
63  virtual const DtVector& targetPoint() const;
64 
66  virtual void setTargetVelocity(const DtVector& arg);
67  virtual const DtVector& targetVelocity() const;
68 
70  virtual void calculateSteering(const DtVector& relativeVelocity, const DtVector& localPosition,
71  const DtVector& targetVelocity, const DtVector& targetPoint, double& maneuverAccelXOut, double& maneuverAccelYOut,
72  double& maneuverAccelZOut) override;
73 
77  static void targetPointCallback(DtSimMessage * msg, void * usr);
78 
81  virtual void processTargetPointTask(DtSimMessage * msg);
82 
86  static DtSimComponent * creator(const DtString& name,
87  DtLocalObject* owner,
88  DtSimulationServices* simManager,
89  DtComponentDescriptor* desc = 0,
90  DtReaderWriterRegistry* parentRegistry = 0);
91 
94  virtual void setTargetEntity(const DtUUID& entity);
95  virtual DtSimObjectReference targetEntity() const;
96 
97 protected:
101 
105 
109 
111  virtual void registerTaskMsgCallbacks() override;
112 
115  virtual bool setupControlPoint();
116 
118  virtual double findDesiredSpeed();
119 
125  virtual void doMoving();
126 
129  virtual DtMissileLaunchPhase launchPhase() const;
130  virtual void setLaunchPhase(DtMissileLaunchPhase phase);
131 
132 protected:
134 };
135 
UUID is a unique ID wrapper class.
Definition: uuid.h:59
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual void registerTaskMsgCallbacks()
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
const DtMissileControllerComponent & operator=(const DtMissileControllerComponent &orig)
assignment operator; not implemented
Definition: readerWriterRegistry.h:39
DtMissileLaunchPhaseEnum
Definition: missileFlightPSR.h:22
virtual const char * type() const override
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtMissileMoveToControllerComponent is a controller that maneuvers a missile toward a given target poi...
Definition: missileMoveToControllerComponent.h:37
virtual void calculateSteering(const DtVector &relativeVelocity, const DtVector &localPosition, const DtVector &targetVelocity, const DtVector &targetPoint, double &maneuverAccelXOut, double &maneuverAccelYOut, double &maneuverAccelZOut)=0
Calculates the maneuvering thrust necessary to aim at the target. Usually calls either calculateSteer...
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
DtMissileControllerComponent is a controller that contains all of the functionality common to all mis...
Definition: missileControllerComponent.h:33
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
DtMovementSimObjectFacade myEntityPointerSimObjectFacade
Definition: missileMoveToControllerComponent.h:133
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)