Panda3D
collisionPlane.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 collisionPlane.I
10  * @author drose
11  * @date 2000-04-25
12  */
13 
14 /**
15  * This is only for the convenience of CollisionPolygon. Normally, you should
16  * not attempt to create an uninitialized CollisionPlane.
17  */
18 INLINE CollisionPlane::
19 CollisionPlane() {
20 }
21 
22 /**
23  *
24  */
25 INLINE CollisionPlane::
26 CollisionPlane(const LPlane &plane) :
27  _plane(plane)
28 {
29 }
30 
31 /**
32  *
33  */
34 INLINE CollisionPlane::
35 CollisionPlane(const CollisionPlane &copy) :
36  CollisionSolid(copy),
37  _plane(copy._plane)
38 {
39 }
40 
41 /**
42  * Flushes the PStatCollectors used during traversal.
43  */
44 INLINE void CollisionPlane::
46  _volume_pcollector.flush_level();
47  _test_pcollector.flush_level();
48 }
49 
50 /**
51  *
52  */
53 INLINE LVector3 CollisionPlane::
54 get_normal() const {
55  return _plane.get_normal();
56 }
57 
58 /**
59  *
60  */
61 INLINE PN_stdfloat CollisionPlane::
62 dist_to_plane(const LPoint3 &point) const {
63  return _plane.dist_to_plane(point);
64 }
65 
66 /**
67  *
68  */
69 INLINE void CollisionPlane::
70 set_plane(const LPlane &plane) {
71  _plane = plane;
72  mark_internal_bounds_stale();
73  mark_viz_stale();
74 }
75 
76 /**
77  *
78  */
79 INLINE const LPlane &CollisionPlane::
80 get_plane() const {
81  return _plane;
82 }
83 
84 /**
85  * Convenience method to flip the plane in-place.
86  */
87 INLINE void CollisionPlane::
88 flip() {
89  _plane.flip();
90 }
void flip()
Convenience method to flip the plane in-place.
The abstract base class for all things that can collide with other things in the world,...
static void flush_level()
Flushes the PStatCollectors used during traversal.