Panda3D

collisionCone.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 collisionCone.I
10 * @author rdb
11 * @date 2021-01-29
12 */
13
14 /**
15 *
16 */
17 INLINE CollisionCone::
18 CollisionCone() {
19 }
20
21 /**
22 *
23 */
24 INLINE CollisionCone::
25 CollisionCone(PN_stdfloat radius, PN_stdfloat height) :
26 _apex(0, 0, height),
27 _radius(radius) {
28 }
29
30 /**
31 *
32 */
33 INLINE CollisionCone::
34 CollisionCone(const CollisionCone &copy) :
35 _apex(copy._apex),
36 _radius(copy._radius) {
37 }
38
39 /**
40 *
41 */
42 INLINE void CollisionCone::
43 set_radius(PN_stdfloat radius) {
44 nassertv(radius >= 0.0f);
45 _radius = radius;
46 mark_internal_bounds_stale();
47 mark_viz_stale();
48 }
49
50 /**
51 *
52 */
53 INLINE PN_stdfloat CollisionCone::
54 get_radius() const {
55 return _radius;
56 }
57
58 /**
59 *
60 */
61 INLINE const LPoint3 &CollisionCone::
62 get_apex() const {
63 return _apex;
64 }
CollisionCone
This implements a conical solid consisting a circular base with a pointy tip.
Definition: collisionCone.h:23