VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
subSurfaceEntitySimpleActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 #pragma once
11 
13 
14 
33 {
34 
35 public:
36 
39  DtVrfObject* owner,
40  DtSimManager* simManager,
41  DtComponentDescriptor* desc = 0,
42  DtReaderWriterRegistry* parentRegistry = 0);
43 
49 
52  virtual bool init();
53 
56  virtual const char* type() const;
57 
58 
62  static DtSimComponent * creator(const DtString& name,
63  DtVrfObject* owner,
64  DtSimManager* simManager,
65  DtComponentDescriptor* desc = 0,
66  DtReaderWriterRegistry* parentRegistry = 0);
67 
68 protected:
69 
72  virtual bool createPorts();
73 
75  virtual void tick();
76 
79  virtual double updateVerticalSpeed(const double dt);
80 
89  virtual void adjustAttitude(const double newSpeed, const DtVector& position,
90  const double yawRate,
91  double &roll, double &pitch, double &altitude);
92 
107  virtual double altitudeFromDepth(double depth, double surfaceAltitude);
108  virtual double depthFromAltitude(double altitude, double surfaceAltitude)
109  {
110  return altitudeFromDepth(altitude, surfaceAltitude);
111  }
112 
113 protected:
114 
117 
120  (const DtSubSurfaceEntitySimpleActuator & orig);
121 
123  const DtSubSurfaceEntitySimpleActuator & operator=
124  (const DtSubSurfaceEntitySimpleActuator & orig);
125 
126 
127 protected:
128 
131 
135 
139 
141 
142  double myDepth;
143 
148 
150 };
151 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
Provides a simple actuator model for surface vessels.
Definition: subSurfaceEntitySimpleActuator.h:31
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
static DtSimComponent * creator(const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
virtual double updateVerticalSpeed(const double dT)
Update the vertical speed.
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
virtual void adjustAttitude(const double newSpeed, const DtVector &position, const double yawRate, double &roll, double &pitch, double &altitudeAdj)
Adjusts the attitude of the entity for improved appearance.
virtual double depthFromAltitude(double altitude, double surfaceAltitude)
Definition: subSurfaceEntitySimpleActuator.h:108
virtual bool init()
Calls down to the base class, null checks entity(), calls createPSR(), and then caches the entity's s...
virtual const char * type() const
Returns a string identifies the class type of component.
double myAltitudeRate
The negative of depthRate on the input port, or 0 if the port isn't active.
Definition: subSurfaceEntitySimpleActuator.h:146
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
DtAnalogInputPort * myClampDepthPort
Final desired depth that entity is trying to change to.
Definition: subSurfaceEntitySimpleActuator.h:138
double myDepth
Computed and cached within a tick, to avoid recomputation.
Definition: subSurfaceEntitySimpleActuator.h:142
Contains class declarations for DtAnalogInputPort, DtAnalogOutputPort, and DtAnalogPortData.
Definition: analogIOPort.h:25
virtual void tick()
Calculates new kinematic state.
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
Provides a simple, kinematics-based model for surface vessels.
Definition: surfaceEntitySimpleActuator.h:41
virtual bool createPorts()
Creates myAccelerationPort, myClampSpeedPort, myTurnRadiusPort, and myFinalHeadingPort and adds them ...
DtAnalogInputPort * myDepthRatePort
Desired depth change rate, in m/s.
Definition: subSurfaceEntitySimpleActuator.h:134

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)