Panda3D
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 
14 INLINE void OdeSliderJoint::
15 set_axis(dReal x, dReal y, dReal z) {
16  dJointSetSliderAxis(_id, x, y, z);
17 }
18 
19 INLINE void OdeSliderJoint::
20 set_axis(const LVecBase3f &axis) {
21  dJointSetSliderAxis(_id, axis[0], axis[1], axis[2]);
22 }
23 
24 INLINE void OdeSliderJoint::
25 set_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 
29 INLINE void OdeSliderJoint::
30 set_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 
34 INLINE void OdeSliderJoint::
35 add_force(dReal force) {
36  dJointAddSliderForce(_id, force);
37 }
38 
39 INLINE dReal OdeSliderJoint::
40 get_position() const {
41  return dJointGetSliderPosition(_id);
42 }
43 
44 INLINE dReal OdeSliderJoint::
45 get_position_rate() const {
46  return dJointGetSliderPositionRate(_id);
47 }
48 
49 INLINE LVecBase3f OdeSliderJoint::
50 get_axis() const {
51  dVector3 result;
52  dJointGetSliderAxis(_id, result);
53  return LVecBase3f(result[0], result[1], result[2]);
54 }
55 
56 INLINE void OdeSliderJoint::
57 set_param_lo_stop(dReal val) {
58  nassertv( _id != 0 );
59  dJointSetSliderParam(_id, dParamLoStop, val);
60 }
61 
62 INLINE void OdeSliderJoint::
63 set_param_hi_stop(dReal val) {
64  nassertv( _id != 0 );
65  dJointSetSliderParam(_id, dParamHiStop, val);
66 }
67 
68 INLINE void OdeSliderJoint::
69 set_param_vel(dReal val) {
70  nassertv( _id != 0 );
71  dJointSetSliderParam(_id, dParamVel, val);
72 }
73 
74 INLINE void OdeSliderJoint::
75 set_param_f_max(dReal val) {
76  nassertv( _id != 0 );
77  dJointSetSliderParam(_id, dParamFMax, val);
78 }
79 
80 INLINE void OdeSliderJoint::
81 set_param_fudge_factor(dReal val) {
82  nassertv( _id != 0 );
83  dJointSetSliderParam(_id, dParamFudgeFactor, val);
84 }
85 
86 INLINE void OdeSliderJoint::
87 set_param_bounce(dReal val) {
88  nassertv( _id != 0 );
89  dJointSetSliderParam(_id, dParamBounce, val);
90 }
91 
92 INLINE void OdeSliderJoint::
93 set_param_CFM(dReal val) {
94  nassertv( _id != 0 );
95  dJointSetSliderParam(_id, dParamCFM, val);
96 }
97 
98 INLINE void OdeSliderJoint::
99 set_param_stop_ERP(dReal val) {
100  nassertv( _id != 0 );
101  dJointSetSliderParam(_id, dParamStopERP, val);
102 }
103 
104 INLINE void OdeSliderJoint::
105 set_param_stop_CFM(dReal val) {
106  nassertv( _id != 0 );
107  dJointSetSliderParam(_id, dParamStopCFM, val);
108 }
109 
110 INLINE dReal OdeSliderJoint::
111 get_param_lo_stop() const {
112  nassertr( _id != 0, 0 );
113  return dJointGetSliderParam(_id, dParamLoStop);
114 }
115 
116 INLINE dReal OdeSliderJoint::
117 get_param_hi_stop() const {
118  nassertr( _id != 0, 0 );
119  return dJointGetSliderParam(_id, dParamHiStop);
120 }
121 
122 INLINE dReal OdeSliderJoint::
123 get_param_vel() const {
124  nassertr( _id != 0, 0 );
125  return dJointGetSliderParam(_id, dParamVel);
126 }
127 
128 INLINE dReal OdeSliderJoint::
129 get_param_f_max() const {
130  nassertr( _id != 0, 0 );
131  return dJointGetSliderParam(_id, dParamFMax);
132 }
133 
134 INLINE dReal OdeSliderJoint::
135 get_param_fudge_factor() const {
136  nassertr( _id != 0, 0 );
137  return dJointGetSliderParam(_id, dParamFudgeFactor);
138 }
139 
140 INLINE dReal OdeSliderJoint::
141 get_param_bounce() const {
142  nassertr( _id != 0, 0 );
143  return dJointGetSliderParam(_id, dParamBounce);
144 }
145 
146 INLINE dReal OdeSliderJoint::
147 get_param_CFM() const {
148  nassertr( _id != 0, 0 );
149  return dJointGetSliderParam(_id, dParamCFM);
150 }
151 
152 INLINE dReal OdeSliderJoint::
153 get_param_stop_ERP() const {
154  nassertr( _id != 0, 0 );
155  return dJointGetSliderParam(_id, dParamStopERP);
156 }
157 
158 INLINE dReal OdeSliderJoint::
159 get_param_stop_CFM() const {
160  nassertr( _id != 0, 0 );
161  return dJointGetSliderParam(_id, dParamStopCFM);
162 }