Panda3D
 All Classes Functions Variables Enumerations
odeHingeJoint.I
1 // Filename: odeHingeJoint.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 OdeHingeJoint::
16 set_anchor(dReal x, dReal y, dReal z) {
17  dJointSetHingeAnchor(_id, x, y, z);
18 }
19 
20 INLINE void OdeHingeJoint::
21 set_anchor(const LVecBase3f &anchor) {
22  dJointSetHingeAnchor(_id, anchor[0], anchor[1], anchor[2]);
23 }
24 
25 INLINE void OdeHingeJoint::
26 set_anchor_delta(dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az) {
27  dJointSetHingeAnchorDelta(_id, x, y, z, ax, ay, az);
28 }
29 
30 INLINE void OdeHingeJoint::
31 set_anchor_delta(const LVecBase3f &anchor, const LVecBase3f &vec) {
32  dJointSetHingeAnchorDelta(_id, anchor[0], anchor[1], anchor[2], vec[0], vec[1], vec[2]);
33 }
34 
35 INLINE void OdeHingeJoint::
36 set_axis(dReal x, dReal y, dReal z) {
37  dJointSetHingeAxis(_id, x, y, z);
38 }
39 
40 INLINE void OdeHingeJoint::
41 set_axis(const LVecBase3f &axis) {
42  dJointSetHingeAxis(_id, axis[0], axis[1], axis[2]);
43 }
44 
45 INLINE void OdeHingeJoint::
46 add_torque(dReal torque) {
47  dJointAddHingeTorque(_id, torque);
48 }
49 
50 INLINE LVecBase3f OdeHingeJoint::
51 get_anchor() const {
52  dVector3 result;
53  dJointGetHingeAnchor(_id, result);
54  return LVecBase3f(result[0], result[1], result[2]);
55 }
56 
57 INLINE LVecBase3f OdeHingeJoint::
58 get_anchor2() const {
59  dVector3 result;
60  dJointGetHingeAnchor2(_id, result);
61  return LVecBase3f(result[0], result[1], result[2]);
62 }
63 
64 INLINE LVecBase3f OdeHingeJoint::
65 get_axis() const {
66  dVector3 result;
67  dJointGetHingeAxis(_id, result);
68  return LVecBase3f(result[0], result[1], result[2]);
69 }
70 
71 INLINE dReal OdeHingeJoint::
72 get_angle() const {
73  return dJointGetHingeAngle(_id);
74 }
75 
76 INLINE dReal OdeHingeJoint::
77 get_angle_rate() const {
78  return dJointGetHingeAngleRate(_id);
79 }
80 
81 INLINE void OdeHingeJoint::
82 set_param_lo_stop(dReal val) {
83  nassertv( _id != 0 );
84  dJointSetHingeParam(_id, dParamLoStop, val);
85 }
86 
87 INLINE void OdeHingeJoint::
88 set_param_hi_stop(dReal val) {
89  nassertv( _id != 0 );
90  dJointSetHingeParam(_id, dParamHiStop, val);
91 }
92 
93 INLINE void OdeHingeJoint::
94 set_param_vel(dReal val) {
95  nassertv( _id != 0 );
96  dJointSetHingeParam(_id, dParamVel, val);
97 }
98 
99 INLINE void OdeHingeJoint::
100 set_param_f_max(dReal val) {
101  nassertv( _id != 0 );
102  dJointSetHingeParam(_id, dParamFMax, val);
103 }
104 
105 INLINE void OdeHingeJoint::
106 set_param_fudge_factor(dReal val) {
107  nassertv( _id != 0 );
108  dJointSetHingeParam(_id, dParamFudgeFactor, val);
109 }
110 
111 INLINE void OdeHingeJoint::
112 set_param_bounce(dReal val) {
113  nassertv( _id != 0 );
114  dJointSetHingeParam(_id, dParamBounce, val);
115 }
116 
117 INLINE void OdeHingeJoint::
118 set_param_CFM(dReal val) {
119  nassertv( _id != 0 );
120  dJointSetHingeParam(_id, dParamCFM, val);
121 }
122 
123 INLINE void OdeHingeJoint::
124 set_param_stop_ERP(dReal val) {
125  nassertv( _id != 0 );
126  dJointSetHingeParam(_id, dParamStopERP, val);
127 }
128 
129 INLINE void OdeHingeJoint::
130 set_param_stop_CFM(dReal val) {
131  nassertv( _id != 0 );
132  dJointSetHingeParam(_id, dParamStopCFM, val);
133 }
134 
135 INLINE dReal OdeHingeJoint::
136 get_param_lo_stop() const {
137  nassertr( _id != 0, 0 );
138  return dJointGetHingeParam(_id, dParamLoStop);
139 }
140 
141 INLINE dReal OdeHingeJoint::
142 get_param_hi_stop() const {
143  nassertr( _id != 0, 0 );
144  return dJointGetHingeParam(_id, dParamHiStop);
145 }
146 
147 INLINE dReal OdeHingeJoint::
148 get_param_vel() const {
149  nassertr( _id != 0, 0 );
150  return dJointGetHingeParam(_id, dParamVel);
151 }
152 
153 INLINE dReal OdeHingeJoint::
154 get_param_f_max() const {
155  nassertr( _id != 0, 0 );
156  return dJointGetHingeParam(_id, dParamFMax);
157 }
158 
159 INLINE dReal OdeHingeJoint::
160 get_param_fudge_factor() const {
161  nassertr( _id != 0, 0 );
162  return dJointGetHingeParam(_id, dParamFudgeFactor);
163 }
164 
165 INLINE dReal OdeHingeJoint::
166 get_param_bounce() const {
167  nassertr( _id != 0, 0 );
168  return dJointGetHingeParam(_id, dParamBounce);
169 }
170 
171 INLINE dReal OdeHingeJoint::
172 get_param_CFM() const {
173  nassertr( _id != 0, 0 );
174  return dJointGetHingeParam(_id, dParamCFM);
175 }
176 
177 INLINE dReal OdeHingeJoint::
178 get_param_stop_ERP() const {
179  nassertr( _id != 0, 0 );
180  return dJointGetHingeParam(_id, dParamStopERP);
181 }
182 
183 INLINE dReal OdeHingeJoint::
184 get_param_stop_CFM() const {
185  nassertr( _id != 0, 0 );
186  return dJointGetHingeParam(_id, dParamStopCFM);
187 }
188 
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:105