VR-Forces 4.5 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vrfmodel
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
13
#include "
vrfobjcore/actuatorComponent.h
"
14
#include "
vrfmodel/vrfmodelDefines.h
"
15
#include "
vrfLua/luaScriptInterfaceImpl.h
"
16
#include "
vrfmodel/bindableLuaComponent.h
"
17
18
class
DtString
;
19
class
DtSimManager
;
20
class
DtBooleanInputPort
;
21
class
DtIntegerOutputPort
;
22
class
DtSimObjectBaseObjectStateRepository;
23
class
DtSwingingPartActuatorDescriptor
;
24
class
DtSwingingPartActuatorPSR
;
25
37
class
DT_DLL_vrfmodel
DtSwingingPartActuator
:
public
DtActuatorComponent
,
38
public
DtBindableLuaComponent
<DtSwingingPartActuator>
39
{
40
41
public
:
42
45
DtSwingingPartActuator
(
const
DtString
& name,
46
DtVrfObject
* owner,
47
DtSimManager
* simManager,
48
DtComponentDescriptor
* desc = 0,
49
DtReaderWriterRegistry
* parentRegistry = 0);
50
52
virtual
~
DtSwingingPartActuator
();
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
:
84
virtual
void
open();
85
88
virtual
void
reset
();
89
91
virtual
void
close();
92
94
virtual
bool
isOpened()
const
;
95
97
virtual
bool
isClosed()
const
;
99
100
protected
:
102
virtual
bool
createPorts
();
103
109
virtual
DtSwingingPartActuatorPSR
* createPSR();
110
112
virtual
double
currentPosition();
113
115
virtual
void
setPositionAndRate(
double
newPos,
double
newRate);
116
119
virtual
bool
angleWithinSlewArc(
double
angle);
120
121
private
:
123
DtSwingingPartActuator
();
125
DtSwingingPartActuator
(
const
DtSwingingPartActuator
& orig);
127
const
DtSwingingPartActuator
&
operator=
(
const
128
DtSwingingPartActuator
& orig);
129
130
protected
:
131
134
138
DtIntegerOutputPort
*
myCurrentStateOutputPort
;
139
145
DtBooleanInputPort
*
myRequestedStateInputPort
;
147
149
DtArticulatedPartStateRepository
*
myArtPartStateRep
;
150
151
const
DtSwingingPartActuatorDescriptor
*
myDescriptor
;
152
153
enum
SwingAxis
154
{
155
XAxis
,
156
YAxis
,
157
ZAxis
158
};
159
160
SwingAxis
mySwingAxis
;
161
164
DtSwingingPartActuatorPSR
*
myProcessState
;
165
};
Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (
www.mak.com
)