VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
surfaceEntityMoveToLocationController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
16 
17 #include "vrfutil/scriptGeometry.h"
18 
30 {
31 private:
34 
38 
42 
43 public:
47  DtLocalObject* owner,
48  DtSimulationServices* simManager,
49  DtComponentDescriptor* desc = 0,
50  DtReaderWriterRegistry* parentRegistry = 0);
51 
54 
57  virtual const char* type() const;
58 
67  static void moveToLocationCallback(DtSimMessage* msg, void* usr);
68 
73  virtual void processMoveToLocationTask(DtSimMessage* msg);
74 
77  virtual void initializeLocals(const DtVector& globalTarget);
78 
82  virtual void registerTaskMsgCallbacks();
83 
87  static DtSimComponent* creator(const DtString& name,
88  DtLocalObject* owner,
89  DtSimulationServices* simManager,
90  DtComponentDescriptor* desc = 0,
91  DtReaderWriterRegistry* parentRegistry = 0);
92 
93  virtual void tick();
94 
95 protected:
109  virtual bool setupControlPoint();
110 
114  virtual bool passedGoal();
115 
117  virtual bool atGoal();
118 
125  virtual void controlMovement();
126 
128  virtual void processEstimatedTotCalculation();
129 
131  virtual void updateTaskVisualizations();
132 
133 protected:
136  DtBoolean myPassedGoal;
137  DtBoolean myAtGoal;
140 
147 
149  const double DtEstimatedTotCalcInterval = 5.0;
150 
159 };
160 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVector2D myCurrentGoalToEntity2DVector
Definition: surfaceEntityMoveToLocationController.h:138
DtLocation3D myAimingPoint
Note: in general, this is not the negation of the goal-to-entit...
Definition: surfaceEntityMoveToLocationController.h:146
virtual void registerTaskMsgCallbacks()
DtVector myEstimatedTotTextPos
tot text position
Definition: surfaceEntityMoveToLocationController.h:158
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
bool myEstimatedTotCalcEnabled
enabled flag for the tot calculations
Definition: surfaceEntityMoveToLocationController.h:152
const DtSurfaceEntityPilotController & operator=(const DtSurfaceEntityPilotController &orig)
assignment operator; not implemented
DtLocation3D myEntityPoint
These data are computed each tick and used later in the same tick.
Definition: surfaceEntityMoveToLocationController.h:135
DtBoolean myAtGoal
Definition: surfaceEntityMoveToLocationController.h:137
double myEstimatedTotValue
the tot value
Definition: surfaceEntityMoveToLocationController.h:154
//! DtSurfaceEntityMoveToLocationController is a controller that models the movement of a surface ent...
Definition: surfaceEntityMoveToLocationController.h:28
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:436
double myEstimatedTotLastCalcTime
used for tot calculation intervals
Definition: surfaceEntityMoveToLocationController.h:156
virtual void tick()
Overridden to check for valid myProcessState pointer. If it is null a warning is printed to the objec...
File: simMsg.h.
Definition: simMessage.h:35
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
DtVector2D is a vector in earth-relative coordinates, e.g. east-north. Its direction in space depends...
Definition: scriptGeometry.h:285
DtBoolean myPassedGoal
Definition: surfaceEntityMoveToLocationController.h:136
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
The DtSurfaceEntityPilotController provides basic movement capabilities for surface entities and crea...
Definition: surfaceEntityPilotController.h:78
DtVector2D myCurrentEntityToGoal2DVector
Definition: surfaceEntityMoveToLocationController.h:139
virtual const char * type() const
Returns a string identifies the class type of component. Type values are defined in compTypes...
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
A location3D is a point in space, i.e. a geocentric coordinate.
Definition: scriptGeometry.h:22

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)