Panda3D
Loading...
Searching...
No Matches
bulletCapsuleShape.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 bulletCapsuleShape.I
10 * @author enn0x
11 * @date 2010-01-27
12 */
13
14/**
15 * Only used by make_from_bam.
16 */
17INLINE BulletCapsuleShape::
18BulletCapsuleShape() :
19 _shape(nullptr),
20 _radius(0),
21 _height(0),
22 _up(X_up) {
23}
24
25/**
26 *
27 */
28INLINE BulletCapsuleShape::
29~BulletCapsuleShape() {
30
31 delete _shape;
32}
33
34/**
35 * Returns the radius that was used to construct this capsule.
36 */
37INLINE PN_stdfloat BulletCapsuleShape::
38get_radius() const {
39 return _radius;
40}
41
42/**
43 * Returns half of get_height().
44 * @deprecated see get_height() instead.
45 */
46INLINE PN_stdfloat BulletCapsuleShape::
47get_half_height() const {
48 return _height * 0.5;
49}
50
51/**
52 * Returns the height that was used to construct this capsule.
53 */
54INLINE PN_stdfloat BulletCapsuleShape::
55get_height() const {
56 return _height;
57}
get_radius
Returns the radius that was used to construct this capsule.
get_height
Returns the height that was used to construct this capsule.
PN_stdfloat get_half_height() const
Returns half of get_height().