VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
missileTrackEntityController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 
13 #pragma once
14 
17 
18 #include <vlutil/vlString.h>
19 #include <matrix/vlVector.h>
22 
24 class DtSimMessage;
25 
26 
37 {
38 
39 public:
40 
44  DtLocalObject* owner,
45  DtSimulationServices* simManager,
46  DtComponentDescriptor* desc = 0,
47  DtReaderWriterRegistry* parentRegistry = 0);
48 
51 
59  virtual void tick();
60 
63  virtual const char* type() const;
64 
67  virtual void setTargetEntity(const DtUUID& entity);
68  virtual DtSimObjectReference targetEntity() const;
69 
72  virtual DtMissileLaunchPhase launchPhase() const;
73  virtual void setLaunchPhase(DtMissileLaunchPhase phase);
74 
77  virtual void calculateSteering(const DtVector &relativeVelocity,
78  const DtVector &localPosition,
79  const DtVector &targetVelocity,
80  const DtVector &targetPoint,
81  double& maneuverAccelXOut,
82  double& maneuverAccelYOut,
83  double& maneuverAccelZOut);
84 
88  static void targetEntityCallback(DtSimMessage * msg, void * usr);
89 
92  virtual void processTargetEntityTask(DtSimMessage * msg);
93 
97  static DtSimComponent * creator(const DtString& name,
98  DtLocalObject* owner,
99  DtSimulationServices* simManager,
100  DtComponentDescriptor* desc = 0,
101  DtReaderWriterRegistry* parentRegistry = 0);
102 
103 protected:
107 
110  orig);
111 
115 
118  virtual void registerTaskMsgCallbacks();
119 
128  virtual bool setupControlPoint();
129 
131  virtual double findDesiredSpeed();
132 
133 protected:
134 
137 
140 };
141 
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()
Overrides this so it can register its interest in MoveTo commands.
const DtMissileMoveToControllerComponent & operator=(const DtMissileMoveToControllerComponent &orig)
assignment operator; see comments on copy constructor!
virtual double findDesiredSpeed()
Returns the maximum speed for the missile.
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
DtMissileLaunchPhaseEnum
Definition: missileFlightPSR.h:22
virtual void calculateSteering(const DtVector &relativeVelocity, const DtVector &localPosition, const DtVector &targetVelocity, const DtVector &targetPoint, double &maneuverAccelXOut, double &maneuverAccelYOut, double &maneuverAccelZOut)
Just calls down to calculateSteeringToPoint (ignoring targetVelocity).
DtMissileMoveToControllerComponent is a controller that maneuvers a missile toward a given target poi...
Definition: missileMoveToControllerComponent.h:35
virtual void tick()
Calculate new control values.
File: simMsg.h.
Definition: simMessage.h:35
DtMovementSimObjectFacade myEntityPointerSimObjectFacade
Definition: missileTrackEntityController.h:139
virtual bool setupControlPoint()
Returns the boolean member data flag myMissilesTargeted, indicating whether or not a target location ...
virtual const char * type() const
Returns a string identifies the class type of component. Type values are defined in compTypes...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
DtMissileTrackEntityController is a controller that models entity tracking behavior for missile entit...
Definition: missileTrackEntityController.h:36
DtSimObjectReference myEntityPointer
Set fresh each frame by setupControlPoint.
Definition: missileTrackEntityController.h:136
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
bool myLookupWarningSent
Definition: missileTrackEntityController.h:138
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)