VR-Forces 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 double getAtDistance();
83 
87  virtual void registerTaskMsgCallbacks();
88 
92  static DtSimComponent* creator(const DtString& name,
93  DtLocalObject* owner,
94  DtSimulationServices* simManager,
95  DtComponentDescriptor* desc = 0,
96  DtReaderWriterRegistry* parentRegistry = 0);
97 
98  virtual void tick();
99 
100 protected:
114  virtual bool setupControlPoint();
115 
119  virtual bool passedGoal();
120 
122  virtual bool atGoal();
123 
130  virtual void controlMovement();
131 
133  virtual void processEstimatedTotCalculation();
134 
136  virtual void updateTaskVisualizations();
137 
138 protected:
141  DtBoolean myPassedGoal;
142  DtBoolean myAtGoal;
145 
152 
155  double myAtDistance;
156 
158  const double DtEstimatedTotCalcInterval = 5.0;
159 
168 };
169 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVector2D myCurrentGoalToEntity2DVector
Definition: surfaceEntityMoveToLocationController.h:143
DtLocation3D myAimingPoint
Note: in general, this is not the negation of the goal-to-entit...
Definition: surfaceEntityMoveToLocationController.h:151
virtual void registerTaskMsgCallbacks()
DtVector myEstimatedTotTextPos
tot text position
Definition: surfaceEntityMoveToLocationController.h:167
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:161
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:140
DtBoolean myAtGoal
Definition: surfaceEntityMoveToLocationController.h:142
double myEstimatedTotValue
the tot value
Definition: surfaceEntityMoveToLocationController.h:163
//! 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:437
double myAtDistance
This is taken from the task message if present, or else from the descriptor.
Definition: surfaceEntityMoveToLocationController.h:155
double myEstimatedTotLastCalcTime
used for tot calculation intervals
Definition: surfaceEntityMoveToLocationController.h:165
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:141
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
The DtSurfaceEntityPilotController provides basic movement capabilities for surface entities and crea...
Definition: surfaceEntityPilotController.h:78
DtVector2D myCurrentEntityToGoal2DVector
Definition: surfaceEntityMoveToLocationController.h:144
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 Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)