forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathodeContactGeom.I
More file actions
80 lines (68 loc) · 1.74 KB
/
odeContactGeom.I
File metadata and controls
80 lines (68 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/**
* PANDA 3D SOFTWARE
* Copyright (c) Carnegie Mellon University. All rights reserved.
*
* All use of this software is subject to the terms of the revised BSD
* license. You should have received a copy of this license along
* with this source code in a file named "LICENSE."
*
* @file odeContactGeom.I
* @author joswilso
* @date 2006-12-27
*/
INLINE LVecBase3f OdeContactGeom::
get_pos() const {
return LVecBase3f(_contact_geom.pos[0],
_contact_geom.pos[1],
_contact_geom.pos[2]);
}
INLINE LVecBase3f OdeContactGeom::
get_normal() const {
return LVecBase3f(_contact_geom.normal[0],
_contact_geom.normal[1],
_contact_geom.normal[2]);
}
INLINE dReal OdeContactGeom::
get_depth() const {
return _contact_geom.depth;
}
INLINE OdeGeom OdeContactGeom::
get_g1() const {
return OdeGeom(_contact_geom.g1);
}
INLINE OdeGeom OdeContactGeom::
get_g2() const {
return OdeGeom(_contact_geom.g2);
}
INLINE int OdeContactGeom::
get_side1() const {
return _contact_geom.side1;
}
INLINE int OdeContactGeom::
get_side2() const {
return _contact_geom.side2;
}
INLINE void OdeContactGeom::
set_pos(const LVecBase3f &pos){
_contact_geom.pos[0] = pos[0];
_contact_geom.pos[1] = pos[1];
_contact_geom.pos[2] = pos[2];
}
INLINE void OdeContactGeom::
set_normal(const LVecBase3f &normal){
_contact_geom.normal[0] = normal[0];
_contact_geom.normal[1] = normal[1];
_contact_geom.normal[2] = normal[2];
}
INLINE void OdeContactGeom::
set_depth(const dReal depth){
_contact_geom.depth = depth;
}
INLINE void OdeContactGeom::
set_g1(const OdeGeom &geom){
_contact_geom.g1 = geom._id;
}
INLINE void OdeContactGeom::
set_g2(const OdeGeom &geom){
_contact_geom.g2 = geom._id;
}