VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
swingingPartActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2006 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
17 
18 class DtString;
19 class DtSimManager;
20 class DtBooleanInputPort;
21 class DtIntegerOutputPort;
22 class DtSimObjectBaseObjectStateRepository;
26 
39  public DtBindableLuaComponent<DtSwingingPartActuator>
40 {
41 
42 public:
43 
46  DtSwingingPartActuator(const DtString& name,
47  DtVrfObject* owner,
48  DtSimManager* simManager,
49  DtComponentDescriptor* desc = 0,
50  DtReaderWriterRegistry* parentRegistry = 0);
51 
53  virtual ~DtSwingingPartActuator();
54 
55  virtual bool init();
56 
58  virtual bool postAddComponentsInit();
59 
62  virtual const char* type() const;
63 
65  virtual void tick();
66 
70  static DtSimComponent * creator(const DtString& name,
71  DtVrfObject* owner,
72  DtSimManager* simManager,
73  DtComponentDescriptor* desc = 0,
74  DtReaderWriterRegistry* parentRegistry = 0);
75 
78  virtual void bindLuaFunctions(lua_State* L);
79  virtual void bindLuaGlobals(lua_State* L);
80 
81 public:
86  virtual void open();
87  virtual void openWithRate(double rate);
88 
91  virtual void reset();
92 
95  virtual void close();
96  virtual void closeWithRate(double rate);
97 
99  virtual bool isOpened() const;
100 
102  virtual bool isClosed() const;
104 
105 protected:
106 
108  {
109  State_Closed = 0,
110  State_In_Transision = 1,
111  State_Open = 2
112  };
113 
115  virtual bool createPorts();
116 
122  virtual DtSwingingPartActuatorPSR* createPSR();
123 
125  virtual void setPositionAndRate(DtVector newPos, DtVector newRate);
126 
129  virtual bool angleWithinSlewArc(double angle, const DtSwingingPartActuatorAxisInfo& axisInfo);
130 
131  virtual DtPartState updateAxis(int axisNum, const DtSwingingPartActuatorAxisInfo& axisInfo, bool desiredOpen, DtVector& newPos, DtVector& newRate);
132 
133  virtual const DtSwingingPartActuatorAxisInfo& xAxisInfo() const;
134  virtual const DtSwingingPartActuatorAxisInfo& yAxisInfo() const;
135  virtual const DtSwingingPartActuatorAxisInfo& zAxisInfo() const;
136 
137 private:
143  const DtSwingingPartActuator & operator=(const
144  DtSwingingPartActuator & orig);
145 
146 protected:
147 
150 
155 
163 
166 
168 
172 };
DtBooleanInputPort * myRequestedStateInputPort
Output Port Name: requested-state Output Port Description: The requested state for this swinging part...
Definition: swingingPartActuator.h:161
#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:144
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
Definition: swingingPartActuatorPSR.h:21
virtual bool init()
Overridden to cache a pointer to the entity&#39;s radio in this class.
virtual void bindLuaFunctions(lua_State *)=0
Override to bind lua functions.
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
DtSwingingPartActuatorDescriptor is the descriptor for DtSwingingPartActuator components.
Definition: swingingPartActuatorDescriptor.h:87
Definition: readerWriterRegistry.h:39
Definition: bindableLuaComponent.h:53
End User Description: DtActuator is the base class for all actuator model components.
Definition: actuatorComponent.h:48
DtPartState
Definition: swingingPartActuator.h:107
virtual void reset()
For those reader/writer items that support it, resets the reader/writer value to original state Defau...
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
virtual void tick()
This gives the thread of control to the component.
DtSwingingPartActuator is a simple actuator which controls the movement of an articulated part as it ...
Definition: swingingPartActuator.h:38
DtSwingingPartActuatorPSR * myProcessState
Container for state data associated with this component such as whether it is in the closed or opened...
Definition: swingingPartActuator.h:171
Contains class declarations for DtBooleanInputPort, DtBooleanOutputPort, and DtBooleanPortData.
Definition: boolIOPort.h:25
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:29
virtual bool createPorts()
Called by init.
DtIntegerOutputPort * myCurrentStateOutputPort
Output Port Name: current-state Output Port Description: Nominal azimuth value.
Definition: swingingPartActuator.h:154
const DtSwingingPartActuatorDescriptor * myDescriptor
Definition: swingingPartActuator.h:167
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
DtArticulatedPartStateRepository * myArtPartStateRep
The state repository that represents the swinging articulated part.
Definition: swingingPartActuator.h:165
Instances of DtIntegerOutputPort are output ports through which data producers can send integer value...
Definition: integerIOPort.h:45
virtual void bindLuaGlobals(lua_State *)=0
Override to bind lua globals.
Information for a particular axis of swinging.
Definition: swingingPartActuatorDescriptor.h:22
virtual const char * type() const =0
Returns a string identifies the class type of component.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)