Panda3D
Loading...
Searching...
No Matches
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
14INLINE LVecBase3f OdeContactGeom::
15get_pos() const {
16 return LVecBase3f(_contact_geom.pos[0],
17 _contact_geom.pos[1],
18 _contact_geom.pos[2]);
19}
20
21INLINE LVecBase3f OdeContactGeom::
22get_normal() const {
23 return LVecBase3f(_contact_geom.normal[0],
24 _contact_geom.normal[1],
25 _contact_geom.normal[2]);
26}
27
28INLINE dReal OdeContactGeom::
29get_depth() const {
30 return _contact_geom.depth;
31}
32
33INLINE OdeGeom OdeContactGeom::
34get_g1() const {
35 return OdeGeom(_contact_geom.g1);
36}
37
38INLINE OdeGeom OdeContactGeom::
39get_g2() const {
40 return OdeGeom(_contact_geom.g2);
41}
42
43INLINE int OdeContactGeom::
44get_side1() const {
45 return _contact_geom.side1;
46}
47
48INLINE int OdeContactGeom::
49get_side2() const {
50 return _contact_geom.side2;
51}
52
53INLINE void OdeContactGeom::
54set_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
60INLINE void OdeContactGeom::
61set_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
67INLINE void OdeContactGeom::
68set_depth(const dReal depth){
69 _contact_geom.depth = depth;
70}
71
72INLINE void OdeContactGeom::
73set_g1(const OdeGeom &geom){
74 _contact_geom.g1 = geom._id;
75}
76
77INLINE void OdeContactGeom::
78set_g2(const OdeGeom &geom){
79 _contact_geom.g2 = geom._id;
80}