VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lookAtActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 #pragma once
11 
15 
17 class DtAnalogInputPort;
18 class DtBooleanInputPort;
19 class DtVectorInputPort;
20 class DtInputPortGroup;
21 
22 namespace makVrf
23 {
24  class DtArticulatedPartStateRepository;
25 }
26 
34 
36 {
37 
38 public:
39 
42  DtLookAtActuator(const DtString& name,
43  DtLocalObject* owner,
44  DtSimulationServices* simManager,
45  DtComponentDescriptor* desc = 0,
46  DtReaderWriterRegistry* parentRegistry = 0);
47 
48 
50  virtual ~DtLookAtActuator() override;
51 
54  virtual const char* type() const override;
55 
57  virtual void tick() override;
58 
62  static DtSimComponent * creator(const DtString& name,
63  DtLocalObject* owner,
64  DtSimulationServices* simManager,
65  DtComponentDescriptor* desc = 0,
66  DtReaderWriterRegistry* parentRegistry = 0);
67 
69  virtual bool init() override;
70 
71 protected:
72 
74  virtual bool createPortGroups() override;
75 
77  virtual bool createPorts() override;
78 
80  virtual void positionHead(double elevation, double azimuith);
81 
83  virtual void elevateHead(double elevation);
84 
87  virtual void rotateHead(double azimuth);
88 
90  virtual void getElevationAndAzimuth(double& elevation, double& azimuth);
91 
93  virtual double elevationAngleToLocalPoint(const DtVector& localPoint, bool& failed);
94 
96  virtual double azimuthAngleToLocalPoint(const DtVector&, bool& failed);
97 
99  virtual void nodHead();
100 
102  virtual void shakeHead();
103 
105  virtual double elevationRate();
106 
108  virtual double azimuthRate();
109 
110 protected:
111 
114 
116  DtLookAtActuator(const DtLookAtActuator & orig);
117 
119  const DtLookAtActuator & operator=(const DtLookAtActuator & orig);
120 
121 protected:
124  DtArtPartType myHeadArtPart;
126 
130 
136 
143 
149 
155 
162 
169 
175 
178 };
179 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtAnalogInputPort * myLookAtElevationPort
Input Port Name: look-at-elevation Input Port Description: The elevation at which to look at...
Definition: lookAtActuator.h:154
DtInputPortGroup * myLookAtControlPortGroup
Input Port Group Name: look-at-control Input Port Group Description: .
Definition: lookAtActuator.h:129
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
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
DtVectorInputPort * myNodOrShakeRatesPort
Input Port Name: nod-or-shake-rates Input Port Description: Vector that defines rates for nod or shak...
Definition: lookAtActuator.h:168
End User Description: DtActuator is the base class for all actuator model components. Developer Description: The DtActuator base class caches a pointer to the entity's radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor's DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it's location, rotation and so forth. These are created in the entity's DtVrfObjectStateRepository createParts() function. This call creates all the attached parts for all the actuators. These articulated state repositories are managed by the DtAttachmentManager. They are cached by their partType which is the DIS Enumeration describing the part from the disEnums.h file and was specified in the actuator's DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtEntityType used to look up articulated parts in the DtAttachementManager. When an actuator needs access to a particular articulated part it looks it up by the part's object type.
Definition: actuatorComponent.h:47
DtVectorInputPort * myLookAtPointPort
Input Port Name: look-at-point Input Port Description: The point at which to look at...
Definition: lookAtActuator.h:135
DtLookAtActuatorDescruptor; a descriptor for the DtLookAtActuator component.
Definition: lookAtActuatorDescriptor.h:19
double myNodOrShakeDirection
Definition: lookAtActuator.h:122
makVrf::DtArticulatedPartStateRepository * myHead
Definition: lookAtActuator.h:125
Contains class declarations for DtVectorInputPort, DtVectorOutputPort, and DtVectorPortData.
Definition: vectorIOPort.h:27
DtAnalogInputPort * myLookAtAzimuthPort
Input Port Name: look-at-azimuth Input Port Description: The azimuth at which to look at...
Definition: lookAtActuator.h:148
DtArtPartType myHeadArtPart
Definition: lookAtActuator.h:124
DtAnalogInputPort * myNodOrShakePort
Input Port Name: nod-or-shake Input Port Description: Integer value that determines nod (1) or shake ...
Definition: lookAtActuator.h:161
virtual bool init() override
Overridden to cache a pointer to the entity's radio in this class.
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
Contains class declarations for DtBooleanInputPort, DtBooleanOutputPort, and DtBooleanPortData.
Definition: boolIOPort.h:25
DtLookAtActuatorDescriptor * myLookAtDescriptor
Definition: lookAtActuator.h:123
DtLookAtActuator provides a simple model of a head.
Definition: lookAtActuator.h:35
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: lookAtActuator.h:177
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
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:40
DtInputPortGroup is a data port group of a data consumer. It may contain any number of DtInputPorts a...
Definition: inputPortGroup.h:35
Contains class declarations for DtAnalogInputPort, DtAnalogOutputPort, and DtAnalogPortData.
Definition: analogIOPort.h:25
DtBooleanInputPort * myLookAtAnglePort
Input Port Name: look-at-angle Input Port Description: Indicates that looking should be done using th...
Definition: lookAtActuator.h:142
DtBooleanInputPort * myResetHeadPort
Input Port Name: reset Input Port Description: Reset head immediately to 0 elevation and azimuth...
Definition: lookAtActuator.h:174
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
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)