Panda3D
bulletCylinderShape.I
1 // Filename: bulletCylinderShape.I
2 // Created by: enn0x (17Feb10)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 ////////////////////////////////////////////////////////////////////
16 // Function: BulletCylinderShape::Destructor
17 // Access: Published
18 // Description:
19 ////////////////////////////////////////////////////////////////////
20 INLINE BulletCylinderShape::
21 ~BulletCylinderShape() {
22 
23  delete _shape;
24 }
25 
26 ////////////////////////////////////////////////////////////////////
27 // Function: BulletCylinderShape::Copy Constructor
28 // Access: Published
29 // Description:
30 ////////////////////////////////////////////////////////////////////
31 INLINE BulletCylinderShape::
32 BulletCylinderShape(const BulletCylinderShape &copy) :
33  _shape(copy._shape) {
34 }
35 
36 ////////////////////////////////////////////////////////////////////
37 // Function: BulletCylinderShape::Copy Assignment Operator
38 // Access: Published
39 // Description:
40 ////////////////////////////////////////////////////////////////////
41 INLINE void BulletCylinderShape::
42 operator = (const BulletCylinderShape &copy) {
43  _shape = copy._shape;
44 }
45 
46 ////////////////////////////////////////////////////////////////////
47 // Function: BulletCylinderShape::get_radius
48 // Access: Published
49 // Description:
50 ////////////////////////////////////////////////////////////////////
51 INLINE PN_stdfloat BulletCylinderShape::
52 get_radius() const {
53 
54  return (PN_stdfloat)_shape->getRadius();
55 }
56 
57 ////////////////////////////////////////////////////////////////////
58 // Function: BulletCylinderShape::get_half_extents_without_margin
59 // Access: Published
60 // Description:
61 ////////////////////////////////////////////////////////////////////
62 INLINE LVecBase3 BulletCylinderShape::
63 get_half_extents_without_margin() const {
64 
65  return btVector3_to_LVecBase3(_shape->getHalfExtentsWithoutMargin());
66 }
67 
68 ////////////////////////////////////////////////////////////////////
69 // Function: BulletCylinderShape::get_half_extents_with_margin
70 // Access: Published
71 // Description:
72 ////////////////////////////////////////////////////////////////////
73 INLINE LVecBase3 BulletCylinderShape::
74 get_half_extents_with_margin() const {
75 
76  return btVector3_to_LVecBase3(_shape->getHalfExtentsWithMargin());
77 }
78 
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:105