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