VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
trailerActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 #include "vlpi/disEnums.h"
16 
17 namespace makVrf
18 {
19  class DtArticulatedPartStateRepository;
20 }
21 
22 class DtString;
26 
28 class DtVrfTrailerActuatorPSR;
29 
44 {
45 
46 public:
47 
50  DtTrailerActuator(const DtString& name,
51  DtLocalObject* owner,
52  DtSimulationServices* simManager,
53  DtComponentDescriptor* desc = 0,
54  DtReaderWriterRegistry* parentRegistry = 0);
55 
57  virtual ~DtTrailerActuator();
58 
61  virtual bool postAddComponentsInit();
62 
64  virtual void preFirstTickInit();
65 
68  virtual const char* type() const;
69 
71  virtual void tick();
72 
76  static DtSimComponent * creator(const DtString& name,
77  DtLocalObject* owner,
78  DtSimulationServices* simManager,
79  DtComponentDescriptor* desc = 0,
80  DtReaderWriterRegistry* parentRegistry = 0);
81 
82 protected:
83 
85  virtual bool createPSR();
89  virtual bool initProcessSR(const makVrf::DtArticulatedPartStateRepository* trailer);
90 
91  virtual void setTrailerArtPart(const DtArtPartType trailerPart);
92  virtual DtArtPartType trailerArtPart() const;
93 
97  virtual bool hasInitializationErrors(makVrf::DtArticulatedPartStateRepository * rotBody) const;
98 
100  virtual void computeBodyToLocalDcm(const DtTaitBryan& topoOrientation,
101  DtDcm& bodyToLocalDcm) const;
102 
110  virtual void computePitchAndRoll(
111  const DtDcm& tentativeTrailerBodyToLocalDcm,
112  const double oldRollAngle,
113  const DtVector& newCouplerGroundLocalPosition,
114  DtVector& newAxleCenterPosition,
115  DtTaitBryan& newInertialAngles) const;
116 
123  virtual void limitAnglesAndSetArtPartState(DtTaitBryan& newBodyAngles,
125  DtVector& newAxleCenterPosition) const;
126 
127 protected:
128 
131 
133  DtTrailerActuator(const DtTrailerActuator & orig);
134 
136  const DtTrailerActuator & operator=(const
137  DtTrailerActuator & orig);
138 
139 
140 protected:
141 
143 
148 
150 
152  DtArtPartType myTrailerArtPart;
153 
158 
161 };
162 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual bool postAddComponentsInit()
Called after all components have been created, initialized and added to the component manager...
Definition: simComponent.h:128
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
DtVector myAxleCenterOffsetFromCoupler
This is the offset from the coupler to the center of the rear axle support. = Axle center xz offset -...
Definition: trailerActuator.h:157
Definition: readerWriterRegistry.h:39
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: trailerActuator.h:160
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 DtObjectType 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
DtTrailerActuatorPSR * myProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: trailerActuator.h:147
DtTrailerActuatorDescriptor is a DtComponentDescriptor that has additional parameter information for ...
Definition: trailerActuatorDescriptor.h:24
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
const DtTrailerActuatorDescriptor * myTrailerActuatorDescriptor
Definition: trailerActuator.h:142
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
DtTrailerActuator provides a simple model of a articulated trailer that is towed behind a vehicle...
Definition: trailerActuator.h:43
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:40
class DtTrailerActuatorPSR:
Definition: trailerActuatorPSR.h:17
DtArtPartType myTrailerArtPart
Info cached from the descriptor:
Definition: trailerActuator.h:152
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. 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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)