Panda3D
odeBallJoint.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 odeBallJoint.I
10  * @author joswilso
11  * @date 2006-12-27
12  */
13 
14 INLINE void OdeBallJoint::
15 set_anchor(dReal x, dReal y, dReal z) {
16  dJointSetBallAnchor(_id, x, y, z);
17 }
18 
19 INLINE void OdeBallJoint::
20 set_anchor(const LVecBase3f &anchor) {
21  dJointSetBallAnchor(_id, anchor[0], anchor[1], anchor[2]);
22 }
23 
24 INLINE void OdeBallJoint::
25 set_anchor2(dReal x, dReal y, dReal z) {
26  dJointSetBallAnchor2(_id, x, y, z);
27 }
28 
29 INLINE void OdeBallJoint::
30 set_anchor2(const LVecBase3f &anchor) {
31  dJointSetBallAnchor2(_id, anchor[0], anchor[1], anchor[2]);
32 }
33 
34 INLINE LVecBase3f OdeBallJoint::
35 get_anchor() const {
36  dVector3 result;
37  dJointGetBallAnchor(_id, result);
38  return LVecBase3f(result[0], result[1], result[2]);
39 }
40 
41 INLINE LVecBase3f OdeBallJoint::
42 get_anchor2() const {
43  dVector3 result;
44  dJointGetBallAnchor2(_id, result);
45  return LVecBase3f(result[0], result[1], result[2]);
46 }