VR-Forces 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() override;
39 
40  virtual bool init() override;
41 
44  virtual const char* type() const override;
45 
46  virtual void tick() override;
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() override;
65 
67  virtual bool createPortGroups() override;
68 
69  virtual DtLookAtPointControllerPSR* createPSR();
70 
71  virtual void registerTaskMsgCallbacks() override;
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() override;
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
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
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:22
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
DtOutputPortGroup is a data port group of a data provider. It may contain any number of DtOutputPorts...
Definition: outputPortGroup.h:34
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 bool init() override
Calls setRadio()
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:277
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:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
virtual void clearTask() override
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
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:23
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)