Panda3D
 All Classes Functions Variables Enumerations
odeContactGeom.I
1 // Filename: odeContactGeom.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 LVecBase3f OdeContactGeom::
16 get_pos() const {
17  return LVecBase3f(_contact_geom.pos[0],
18  _contact_geom.pos[1],
19  _contact_geom.pos[2]);
20 }
21 
22 INLINE LVecBase3f OdeContactGeom::
23 get_normal() const {
24  return LVecBase3f(_contact_geom.normal[0],
25  _contact_geom.normal[1],
26  _contact_geom.normal[2]);
27 }
28 
29 INLINE dReal OdeContactGeom::
30 get_depth() const {
31  return _contact_geom.depth;
32 }
33 
34 INLINE OdeGeom OdeContactGeom::
35 get_g1() const {
36  return OdeGeom(_contact_geom.g1);
37 }
38 
39 INLINE OdeGeom OdeContactGeom::
40 get_g2() const {
41  return OdeGeom(_contact_geom.g2);
42 }
43 
44 INLINE int OdeContactGeom::
45 get_side1() const {
46  return _contact_geom.side1;
47 }
48 
49 INLINE int OdeContactGeom::
50 get_side2() const {
51  return _contact_geom.side2;
52 }
53 
54 INLINE void OdeContactGeom::
55 set_pos(const LVecBase3f &pos){
56  _contact_geom.pos[0] = pos[0];
57  _contact_geom.pos[1] = pos[1];
58  _contact_geom.pos[2] = pos[2];
59 }
60 
61 INLINE void OdeContactGeom::
62 set_normal(const LVecBase3f &normal){
63  _contact_geom.normal[0] = normal[0];
64  _contact_geom.normal[1] = normal[1];
65  _contact_geom.normal[2] = normal[2];
66 }
67 
68 INLINE void OdeContactGeom::
69 set_depth(const dReal depth){
70  _contact_geom.depth = depth;
71 }
72 
73 INLINE void OdeContactGeom::
74 set_g1(const OdeGeom &geom){
75  _contact_geom.g1 = geom._id;
76 }
77 
78 INLINE void OdeContactGeom::
79 set_g2(const OdeGeom &geom){
80  _contact_geom.g2 = geom._id;
81 }
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:105