Panda3D
bulletConeShape.h
1 // Filename: bulletConeShape.h
2 // Created by: enn0x (24Jan10)
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_CONE_SHAPE_H__
16 #define __BULLET_CONE_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 : BulletConeShape
26 // Description :
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDABULLET BulletConeShape : public BulletShape {
29 
30 PUBLISHED:
31  BulletConeShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up);
32  INLINE BulletConeShape(const BulletConeShape &copy);
33  INLINE void operator = (const BulletConeShape &copy);
34  INLINE ~BulletConeShape();
35 
36  INLINE PN_stdfloat get_radius() const;
37  INLINE PN_stdfloat get_height() const;
38 
39 public:
40  virtual btCollisionShape *ptr() const;
41 
42 private:
43  btConeShape *_shape;
44 
45 ////////////////////////////////////////////////////////////////////
46 public:
47  static TypeHandle get_class_type() {
48  return _type_handle;
49  }
50  static void init_type() {
51  BulletShape::init_type();
52  register_type(_type_handle, "BulletConeShape",
53  BulletShape::get_class_type());
54  }
55  virtual TypeHandle get_type() const {
56  return get_class_type();
57  }
58  virtual TypeHandle force_init_type() {
59  init_type();
60  return get_class_type();
61  }
62 
63 private:
64  static TypeHandle _type_handle;
65 };
66 
67 #include "bulletConeShape.I"
68 
69 #endif // __BULLET_CONE_SHAPE_H__
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85