VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
extendablePartActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 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;
25 class DtExtendablePartActuatorAxisInfo;
26 
38  public DtBindableLuaComponent<DtExtendablePartActuator>
39 {
40 
41 public:
42 
46  DtVrfObject* owner,
47  DtSimManager* simManager,
48  DtComponentDescriptor* desc = 0,
49  DtReaderWriterRegistry* parentRegistry = 0);
50 
52  virtual ~DtExtendablePartActuator();
53 
54  virtual bool init();
55 
57  virtual bool postAddComponentsInit();
58 
61  virtual const char* type() const;
62 
64  virtual void tick();
65 
69  static DtSimComponent * creator(const DtString& name,
70  DtVrfObject* owner,
71  DtSimManager* simManager,
72  DtComponentDescriptor* desc = 0,
73  DtReaderWriterRegistry* parentRegistry = 0);
74 
77  virtual void bindLuaFunctions(lua_State* L);
78  virtual void bindLuaGlobals(lua_State* L);
79 
80 public:
85  virtual void extend();
86  virtual void extendWithRate(double rate);
87 
90  virtual void reset();
91 
94  virtual void retract();
95  virtual void retractWithRate(double rate);
96 
98  virtual bool isExtended() const;
99 
101  virtual bool isRetracted() const;
103 
104 protected:
105 
107  {
108  State_Retracted = 0,
109  State_In_Transision = 1,
110  State_Extended = 2
111  };
112 
114  virtual bool createPorts();
115 
121  virtual DtExtendablePartActuatorPSR* createPSR();
122 
123 private:
129  const DtExtendablePartActuator & operator=(const
130  DtExtendablePartActuator & orig);
131 
132 protected:
133 
136 
141 
149 
152 
154 
158 };
DtPartState
Definition: extendablePartActuator.h:106
#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:146
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtExtendablePartActuatorDescriptor is the descriptor for DtExtendablePartActuator components...
Definition: extendablePartActuatorDescriptor.h:20
DtExtendablePartActuator is a simple actuator which controls the movement of an articulated part as i...
Definition: extendablePartActuator.h:37
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.
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
DtBooleanInputPort * myRequestedStateInputPort
Output Port Name: requested-state Output Port Description: The requested state for this extendable pa...
Definition: extendablePartActuator.h:147
DtIntegerOutputPort * myCurrentStateOutputPort
Output Port Name: current-state Output Port Description: Current extension state. ...
Definition: extendablePartActuator.h:140
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
virtual void reset()
For those reader/writer items that support it, resets the reader/writer value to original state Defau...
const DtExtendablePartActuatorDescriptor * myDescriptor
Definition: extendablePartActuator.h:153
virtual void tick()
This gives the thread of control to the component.
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.
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
DtArticulatedPartStateRepository * myArtPartStateRep
The state repository that represents the extendable articulated part.
Definition: extendablePartActuator.h:151
A process state repository for the DtExtendablePartActuator component.
Definition: extendablePartActuatorPSR.h:18
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
DtExtendablePartActuatorPSR * myProcessState
Container for state data associated with this component such as whether it is in the closed or opened...
Definition: extendablePartActuator.h:157
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.
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)