VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lookAtPointController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
13 
14 class DtVectorOutputPort;
16 class DtAnalogOutputPort;
18 class DtSimMessage;
19 class DtScriptedTaskTask;
20 
25 {
26 
27 public:
28 
31  DtLookAtPointController(const DtString& name,
32  DtLocalObject* owner,
33  DtSimulationServices* simManager,
34  DtComponentDescriptor* desc = 0,
35  DtReaderWriterRegistry* parentRegistry = 0);
36 
38  virtual ~DtLookAtPointController();
39 
40  virtual bool init();
41 
44  virtual const char* type() const;
45 
46  virtual void tick();
47 
49  static void setLookAtPointCallback(DtSimMessage * msg, void * usr);
50  virtual void processSetLookAtPoint(DtSimMessage* msg);
51 
55  static DtSimComponent * creator(const DtString& name,
56  DtLocalObject* owner,
57  DtSimulationServices* simManager,
58  DtComponentDescriptor* desc = 0,
59  DtReaderWriterRegistry* parentRegistry = 0);
60 
61 protected:
62 
64  virtual bool createPorts();
65 
67  virtual bool createPortGroups();
68 
69  virtual DtLookAtPointControllerPSR* createPSR();
70 
71  virtual void registerTaskMsgCallbacks();
72 
75  static void nodHeadCallback(DtSimMessage* msg, void* usrData);
76  virtual void processNodHead(DtSimMessage*);
77 
78  static void shakeHeadCallback(DtSimMessage* msg, void* usrData);
79  virtual void processShakeHead(DtSimMessage*);
80 
81  virtual void performLookAt();
82  virtual void performTask();
83 
90  virtual void getTaskValues(DtScriptedTaskTask* task, double& minRange, double& maxRange, double& rate, int& time);
91 
92  virtual void clearTask();
93 
94 private:
95 
98 
101  DtLookAtPointController & orig);
102 
105  const DtLookAtPointController & orig);
106 
107 
108 protected:
109 
111 
113 
114 
118 
124 
131 
137 
143 
152 
159 
166 
172 
174 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtAnalogOutputPort * myNodOrShake
Output Port Name: nod-or-shake Output Port Description: Integer value that determines nod (1) or shak...
Definition: lookAtPointController.h:158
DtBooleanOutputPort * myLookAtAnglePort
Output Port Name: look-at-angle Output Port Description: Indicates that looking should be done using ...
Definition: lookAtPointController.h:130
DtAnalogOutputPort * myLookAtElevationPort
Output Port Name: look-at-elevation Output Port Description: The elevation at which to look at...
Definition: lookAtPointController.h:142
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
virtual void registerTaskMsgCallbacks()
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
DtVectorOutputPort * myLookAtPointPort
Output Port Name: look-at-point Output Port Description: The point at which to look at...
Definition: lookAtPointController.h:123
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
DtBooleanOutputPort * myResetHead
Output Port Name: reset Output Port Description: Reset head immediately to 0 elevation and azimuth...
Definition: lookAtPointController.h:171
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtOutputPortGroup is a data port group of a data provider. It may contain any number of DtOutputPorts...
Definition: outputPortGroup.h:34
virtual bool init()
Calls setRadio()
DtLookAtPointControllerPSR * myProcessState
Definition: lookAtPointController.h:110
DtAnalogOutputPort * myLookAtAzimuthPort
Output Port Name: look-at-azimuth Output Port Description: The azimuth at which to look at...
Definition: lookAtPointController.h:136
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
This class is responsible for handling requests to looking at a particular point. The actual looking ...
Definition: lookAtPointController.h:24
Instances of DtAnalogOutputPort are input ports through which data producers can send real numbers...
Definition: analogIOPort.h:45
Specialized classes.
Definition: scriptedTaskTask.h:274
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
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 ...
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:89
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtVectorOutputPort * myNodOrShakeRates
Output Port Name: nod-or-shake-rates Output Port Description: Vector that defines rates for nod or sh...
Definition: lookAtPointController.h:165
DtBooleanOutputPort * myForbidBaseRotationPort
Output Port Name: forbid-base-rotation Output Port Description: Predicate indicates whether the looki...
Definition: lookAtPointController.h:151
DtOutputPortGroup * myLookAtControlPortGroup
Output Port Group Name: look-at-control Output Port Group Description: .
Definition: lookAtPointController.h:117
DtLookAtPointControllerPSR is a process state repository which holds state variables for the DtLookAt...
Definition: lookAtPointControllerPSR.h:22
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 Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)