Panda3D
bulletCylinderShape.h
1 // Filename: bulletCylinderShape.h
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 #ifndef __BULLET_CYLINDER_SHAPE_H__
16 #define __BULLET_CYLINDER_SHAPE_H__
17 
18 #include "pandabase.h"
19 
20 #include "bullet_includes.h"
21 #include "bullet_utils.h"
22 #include "bulletShape.h"
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : BulletCylinderShape
26 // Description :
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDABULLET BulletCylinderShape : public BulletShape {
29 
30 PUBLISHED:
31  BulletCylinderShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up);
32  BulletCylinderShape(const LVector3 &half_extents, BulletUpAxis up=Z_up);
33  INLINE BulletCylinderShape(const BulletCylinderShape &copy);
34  INLINE void operator = (const BulletCylinderShape &copy);
35  INLINE ~BulletCylinderShape();
36 
37  INLINE PN_stdfloat get_radius() const;
38  INLINE LVecBase3 get_half_extents_without_margin() const;
39  INLINE LVecBase3 get_half_extents_with_margin() const;
40 
41 public:
42  virtual btCollisionShape *ptr() const;
43 
44 private:
45  btCylinderShape *_shape;
46 
47 ////////////////////////////////////////////////////////////////////
48 public:
49  static TypeHandle get_class_type() {
50  return _type_handle;
51  }
52  static void init_type() {
53  BulletShape::init_type();
54  register_type(_type_handle, "BulletCylinderShape",
55  BulletShape::get_class_type());
56  }
57  virtual TypeHandle get_type() const {
58  return get_class_type();
59  }
60  virtual TypeHandle force_init_type() {
61  init_type();
62  return get_class_type();
63  }
64 
65 private:
66  static TypeHandle _type_handle;
67 };
68 
69 #include "bulletCylinderShape.I"
70 
71 #endif // __BULLET_CYLINDER_SHAPE_H__
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:105
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85