Panda3D
 All Classes Functions Variables Enumerations
bulletMultiSphereShape.h
1 // Filename: bulletMultiSphereShape.h
2 // Created by: enn0x (04Jan12)
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_MULTI_SPHERE_SHAPE_H__
16 #define __BULLET_MULTI_SPHERE_SHAPE_H__
17 
18 #include "pandabase.h"
19 
20 #include "bullet_includes.h"
21 #include "bulletShape.h"
22 
23 #include "pta_LVecBase3.h"
24 #include "pta_stdfloat.h"
25 
26 ////////////////////////////////////////////////////////////////////
27 // Class : BulletMultiSphereShape
28 // Description :
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDABULLET BulletMultiSphereShape : public BulletShape {
31 
32 PUBLISHED:
33  BulletMultiSphereShape(const PTA_LVecBase3 &points, const PTA_stdfloat &radii);
35  INLINE void operator = (const BulletMultiSphereShape &copy);
36  INLINE ~BulletMultiSphereShape();
37 
38  INLINE int get_sphere_count() const;
39  INLINE LPoint3 get_sphere_pos(int index) const;
40  INLINE PN_stdfloat get_sphere_radius(int index) const;
41 
42 public:
43  virtual btCollisionShape *ptr() const;
44 
45 private:
46  btMultiSphereShape *_shape;
47 
48 ////////////////////////////////////////////////////////////////////
49 public:
50  static TypeHandle get_class_type() {
51  return _type_handle;
52  }
53  static void init_type() {
54  BulletShape::init_type();
55  register_type(_type_handle, "BulletMultiSphereShape",
56  BulletShape::get_class_type());
57  }
58  virtual TypeHandle get_type() const {
59  return get_class_type();
60  }
61  virtual TypeHandle force_init_type() {
62  init_type();
63  return get_class_type();
64  }
65 
66 private:
67  static TypeHandle _type_handle;
68 };
69 
70 #include "bulletMultiSphereShape.I"
71 
72 #endif // __BULLET_MULTI_SPHERE_SHAPE_H__
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85