VR-Forces 4.10 Class Documentation
 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 
14 #include <vl/hostStructs.h>
15 
17 class DtAnalogInputPort;
18 class DtBooleanInputPort;
19 class DtVectorInputPort;
20 class DtInputPortGroup;
21 
29 
31 {
32 
33 public:
34 
37  DtLookAtActuator(const DtString& name,
38  DtVrfObject* owner,
39  DtSimManager* simManager,
40  DtComponentDescriptor* desc = 0,
41  DtReaderWriterRegistry* parentRegistry = 0);
42 
43 
45  virtual ~DtLookAtActuator();
46 
49  virtual const char* type() const;
50 
52  virtual void tick();
53 
57  static DtSimComponent * creator(const DtString& name,
58  DtVrfObject* owner,
59  DtSimManager* simManager,
60  DtComponentDescriptor* desc = 0,
61  DtReaderWriterRegistry* parentRegistry = 0);
62 
64  virtual bool init();
65 
66 protected:
67 
69  virtual bool createPortGroups();
70 
72  virtual bool createPorts();
73 
75  virtual void positionHead(double elevation, double azimuith);
76 
78  virtual void elevateHead(double elevation);
79 
82  virtual void rotateHead(double azimuth);
83 
85  virtual void getElevationAndAzimuth(double& elevation, double& azimuth);
86 
88  virtual double elevationAngleToLocalPoint(const DtVector& localPoint, bool& failed);
89 
91  virtual double azimuthAngleToLocalPoint(const DtVector&, bool& failed);
92 
94  virtual void nodHead();
95 
97  virtual void shakeHead();
98 
100  virtual double elevationRate();
101 
103  virtual double azimuthRate();
104 
105 protected:
106 
109 
111  DtLookAtActuator(const DtLookAtActuator & orig);
112 
114  const DtLookAtActuator & operator=(const DtLookAtActuator & orig);
115 
116 protected:
119  DtArtPartType myHeadArtPart;
121 
125 
131 
138 
144 
150 
157 
164 
170 };
171 
#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:149
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtInputPortGroup * myLookAtControlPortGroup
Input Port Group Name: look-at-control Input Port Group Description: .
Definition: lookAtActuator.h:124
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
virtual bool init()
Overridden to cache a pointer to the entity&#39;s radio in this class.
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
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:163
End User Description: DtActuator is the base class for all actuator model components.
Definition: actuatorComponent.h:48
DtVectorInputPort * myLookAtPointPort
Input Port Name: look-at-point Input Port Description: The point at which to look at...
Definition: lookAtActuator.h:130
DtLookAtActuatorDescruptor; a descriptor for the DtLookAtActuator component.
Definition: lookAtActuatorDescriptor.h:19
double myNodOrShakeDirection
Definition: lookAtActuator.h:117
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:143
DtArtPartType myHeadArtPart
Definition: lookAtActuator.h:119
DtAnalogInputPort * myNodOrShakePort
Input Port Name: nod-or-shake Input Port Description: Integer value that determines nod (1) or shake ...
Definition: lookAtActuator.h:156
virtual void tick()
This gives the thread of control to the component.
Contains class declarations for DtBooleanInputPort, DtBooleanOutputPort, and DtBooleanPortData.
Definition: boolIOPort.h:25
DtLookAtActuatorDescriptor * myLookAtDescriptor
Definition: lookAtActuator.h:118
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:29
DtLookAtActuator provides a simple model of a head.
Definition: lookAtActuator.h:30
virtual bool createPorts()
Called by init.
virtual bool createPortGroups()
Called by init.
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
DtInputPortGroup is a data port group of a data consumer.
Definition: inputPortGroup.h:32
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:137
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
DtArticulatedPartStateRepository * myHead
Definition: lookAtActuator.h:120
DtBooleanInputPort * myResetHeadPort
Input Port Name: reset Input Port Description: Reset head immediately to 0 elevation and azimuth...
Definition: lookAtActuator.h:169
virtual const char * type() const =0
Returns a string identifies the class type of component.

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)