Panda3D
Loading...
Searching...
No Matches
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 */
18INLINE CollisionPlane::
19CollisionPlane() {
20}
21
22/**
23 *
24 */
25INLINE CollisionPlane::
26CollisionPlane(const LPlane &plane) :
27 _plane(plane)
28{
29}
30
31/**
32 *
33 */
34INLINE CollisionPlane::
35CollisionPlane(const CollisionPlane &copy) :
36 CollisionSolid(copy),
37 _plane(copy._plane)
38{
39}
40
41/**
42 * Flushes the PStatCollectors used during traversal.
43 */
46 _volume_pcollector.flush_level();
47 _test_pcollector.flush_level();
48}
49
50/**
51 *
52 */
53INLINE LVector3 CollisionPlane::
54get_normal() const {
55 return _plane.get_normal();
56}
57
58/**
59 *
60 */
61INLINE PN_stdfloat CollisionPlane::
62dist_to_plane(const LPoint3 &point) const {
63 return _plane.dist_to_plane(point);
64}
65
66/**
67 *
68 */
69INLINE void CollisionPlane::
70set_plane(const LPlane &plane) {
71 _plane = plane;
72 mark_internal_bounds_stale();
73 mark_viz_stale();
74}
75
76/**
77 *
78 */
79INLINE const LPlane &CollisionPlane::
80get_plane() const {
81 return _plane;
82}
83
84/**
85 * Convenience method to flip the plane in-place.
86 */
88flip() {
89 _plane.flip();
90}
void flip()
Convenience method to flip the plane in-place.
static void flush_level()
Flushes the PStatCollectors used during traversal.
The abstract base class for all things that can collide with other things in the world,...