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) 1999 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
14 
16 
17 #include <matrix/vlVector.h>
18 
19 class DtString;
21 class DtConstrainedAnalogPort;
22 class boolPort;
23 class DtSimMessage;
24 
25 
36 {
37 public:
38 
42  DtLocalObject* owner,
43  DtSimulationServices* simManager,
44  DtComponentDescriptor* desc = 0,
45  DtReaderWriterRegistry* parentRegistry = 0);
46 
49 
51  virtual void tick();
52 
55  virtual const char* type() const;
56 
57 
60  virtual void setTargetPoint(const DtVector& targetPoint);
61  virtual const DtVector& targetPoint() const;
62 
64  virtual void setTargetVelocity(const DtVector& arg);
65  virtual const DtVector& targetVelocity() const;
66 
68  virtual void calculateSteering(const DtVector &relativeVelocity,
69  const DtVector &localPosition,
70  const DtVector &targetVelocity,
71  const DtVector &targetPoint,
72  double& maneuverAccelXOut,
73  double& maneuverAccelYOut,
74  double& maneuverAccelZOut);
75 
79  static void targetPointCallback(DtSimMessage * msg, void * usr);
80 
83  virtual void processTargetPointTask(DtSimMessage * msg);
84 
88  static DtSimComponent * creator(const DtString& name,
89  DtLocalObject* owner,
90  DtSimulationServices* simManager,
91  DtComponentDescriptor* desc = 0,
92  DtReaderWriterRegistry* parentRegistry = 0);
93 
94 protected:
98 
102 
106 
108  virtual void registerTaskMsgCallbacks();
109 
112  virtual bool setupControlPoint();
113 
115  virtual double findDesiredSpeed();
116 
122  virtual void doMoving();
123 
124 };
125 
#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
virtual const char * type() const
Returns a string identifies the class type of component. Type values are defined in compTypes...
const DtMissileControllerComponent & operator=(const DtMissileControllerComponent &orig)
assignment operator; not implemented
Definition: readerWriterRegistry.h:39
DtMissileMoveToControllerComponent is a controller that maneuvers a missile toward a given target poi...
Definition: missileMoveToControllerComponent.h:35
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:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
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)