Panda3D
odeContactGeom.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 odeContactGeom.I
10  * @author joswilso
11  * @date 2006-12-27
12  */
13 
14 INLINE LVecBase3f OdeContactGeom::
15 get_pos() const {
16  return LVecBase3f(_contact_geom.pos[0],
17  _contact_geom.pos[1],
18  _contact_geom.pos[2]);
19 }
20 
21 INLINE LVecBase3f OdeContactGeom::
22 get_normal() const {
23  return LVecBase3f(_contact_geom.normal[0],
24  _contact_geom.normal[1],
25  _contact_geom.normal[2]);
26 }
27 
28 INLINE dReal OdeContactGeom::
29 get_depth() const {
30  return _contact_geom.depth;
31 }
32 
33 INLINE OdeGeom OdeContactGeom::
34 get_g1() const {
35  return OdeGeom(_contact_geom.g1);
36 }
37 
38 INLINE OdeGeom OdeContactGeom::
39 get_g2() const {
40  return OdeGeom(_contact_geom.g2);
41 }
42 
43 INLINE int OdeContactGeom::
44 get_side1() const {
45  return _contact_geom.side1;
46 }
47 
48 INLINE int OdeContactGeom::
49 get_side2() const {
50  return _contact_geom.side2;
51 }
52 
53 INLINE void OdeContactGeom::
54 set_pos(const LVecBase3f &pos){
55  _contact_geom.pos[0] = pos[0];
56  _contact_geom.pos[1] = pos[1];
57  _contact_geom.pos[2] = pos[2];
58 }
59 
60 INLINE void OdeContactGeom::
61 set_normal(const LVecBase3f &normal){
62  _contact_geom.normal[0] = normal[0];
63  _contact_geom.normal[1] = normal[1];
64  _contact_geom.normal[2] = normal[2];
65 }
66 
67 INLINE void OdeContactGeom::
68 set_depth(const dReal depth){
69  _contact_geom.depth = depth;
70 }
71 
72 INLINE void OdeContactGeom::
73 set_g1(const OdeGeom &geom){
74  _contact_geom.g1 = geom._id;
75 }
76 
77 INLINE void OdeContactGeom::
78 set_g2(const OdeGeom &geom){
79  _contact_geom.g2 = geom._id;
80 }