forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathodeSliderJoint.I
More file actions
executable file
·164 lines (137 loc) · 3.88 KB
/
odeSliderJoint.I
File metadata and controls
executable file
·164 lines (137 loc) · 3.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
// Filename: odeSliderJoint.I
// Created by: joswilso (27Dec06)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should have received a copy of this license along
// with this source code in a file named "LICENSE."
//
////////////////////////////////////////////////////////////////////
INLINE void OdeSliderJoint::
set_axis(dReal x, dReal y, dReal z) {
dJointSetSliderAxis(_id, x, y, z);
}
INLINE void OdeSliderJoint::
set_axis(const LVecBase3f &axis) {
dJointSetSliderAxis(_id, axis[0], axis[1], axis[2]);
}
INLINE void OdeSliderJoint::
set_axis_delta(dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az) {
dJointSetSliderAxisDelta(_id, x, y, z, ax, ay, az);
}
INLINE void OdeSliderJoint::
set_axis_delta(const LVecBase3f &axis, const LVecBase3f &vec) {
dJointSetSliderAxisDelta(_id, axis[0], axis[1], axis[2], vec[0], vec[1], vec[2]);
}
INLINE void OdeSliderJoint::
add_force(dReal force) {
dJointAddSliderForce(_id, force);
}
INLINE dReal OdeSliderJoint::
get_position() const {
return dJointGetSliderPosition(_id);
}
INLINE dReal OdeSliderJoint::
get_position_rate() const {
return dJointGetSliderPositionRate(_id);
}
INLINE LVecBase3f OdeSliderJoint::
get_axis() const {
dVector3 result;
dJointGetSliderAxis(_id, result);
return LVecBase3f(result[0], result[1], result[2]);
}
INLINE void OdeSliderJoint::
set_param_lo_stop(dReal val) {
nassertv( _id != 0 );
dJointSetSliderParam(_id, dParamLoStop, val);
}
INLINE void OdeSliderJoint::
set_param_hi_stop(dReal val) {
nassertv( _id != 0 );
dJointSetSliderParam(_id, dParamHiStop, val);
}
INLINE void OdeSliderJoint::
set_param_vel(dReal val) {
nassertv( _id != 0 );
dJointSetSliderParam(_id, dParamVel, val);
}
INLINE void OdeSliderJoint::
set_param_f_max(dReal val) {
nassertv( _id != 0 );
dJointSetSliderParam(_id, dParamFMax, val);
}
INLINE void OdeSliderJoint::
set_param_fudge_factor(dReal val) {
nassertv( _id != 0 );
dJointSetSliderParam(_id, dParamFudgeFactor, val);
}
INLINE void OdeSliderJoint::
set_param_bounce(dReal val) {
nassertv( _id != 0 );
dJointSetSliderParam(_id, dParamBounce, val);
}
INLINE void OdeSliderJoint::
set_param_CFM(dReal val) {
nassertv( _id != 0 );
dJointSetSliderParam(_id, dParamCFM, val);
}
INLINE void OdeSliderJoint::
set_param_stop_ERP(dReal val) {
nassertv( _id != 0 );
dJointSetSliderParam(_id, dParamStopERP, val);
}
INLINE void OdeSliderJoint::
set_param_stop_CFM(dReal val) {
nassertv( _id != 0 );
dJointSetSliderParam(_id, dParamStopCFM, val);
}
INLINE dReal OdeSliderJoint::
get_param_lo_stop() const {
nassertr( _id != 0, 0 );
return dJointGetSliderParam(_id, dParamLoStop);
}
INLINE dReal OdeSliderJoint::
get_param_hi_stop() const {
nassertr( _id != 0, 0 );
return dJointGetSliderParam(_id, dParamHiStop);
}
INLINE dReal OdeSliderJoint::
get_param_vel() const {
nassertr( _id != 0, 0 );
return dJointGetSliderParam(_id, dParamVel);
}
INLINE dReal OdeSliderJoint::
get_param_f_max() const {
nassertr( _id != 0, 0 );
return dJointGetSliderParam(_id, dParamFMax);
}
INLINE dReal OdeSliderJoint::
get_param_fudge_factor() const {
nassertr( _id != 0, 0 );
return dJointGetSliderParam(_id, dParamFudgeFactor);
}
INLINE dReal OdeSliderJoint::
get_param_bounce() const {
nassertr( _id != 0, 0 );
return dJointGetSliderParam(_id, dParamBounce);
}
INLINE dReal OdeSliderJoint::
get_param_CFM() const {
nassertr( _id != 0, 0 );
return dJointGetSliderParam(_id, dParamCFM);
}
INLINE dReal OdeSliderJoint::
get_param_stop_ERP() const {
nassertr( _id != 0, 0 );
return dJointGetSliderParam(_id, dParamStopERP);
}
INLINE dReal OdeSliderJoint::
get_param_stop_CFM() const {
nassertr( _id != 0, 0 );
return dJointGetSliderParam(_id, dParamStopCFM);
}