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