Panda3D
 All Classes Functions Variables Enumerations
bulletConvexHullShape.h
1 // Filename: bulletConvexHullShape.h
2 // Created by: enn0x (26Jan10)
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_CONVEX_HULL_SHAPE_H__
16 #define __BULLET_CONVEX_HULL_SHAPE_H__
17 
18 #include "pandabase.h"
19 
20 #include "bullet_includes.h"
21 #include "bulletShape.h"
22 
23 #include "luse.h"
24 #include "geom.h"
25 #include "pta_LVecBase3.h"
26 
27 ////////////////////////////////////////////////////////////////////
28 // Class : BulletConvexHullShape
29 // Description :
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDABULLET BulletConvexHullShape : public BulletShape {
32 
33 PUBLISHED:
35  INLINE BulletConvexHullShape(const BulletConvexHullShape &copy);
36  INLINE void operator = (const BulletConvexHullShape &copy);
37  INLINE ~BulletConvexHullShape();
38 
39  void add_point(const LPoint3 &p);
40  void add_array(const PTA_LVecBase3 &points);
41  void add_geom(const Geom *geom,
42  const TransformState *ts=TransformState::make_identity());
43 
44 public:
45  virtual btCollisionShape *ptr() const;
46 
47 private:
48  btConvexHullShape *_shape;
49 
50 ////////////////////////////////////////////////////////////////////
51 public:
52  static TypeHandle get_class_type() {
53  return _type_handle;
54  }
55  static void init_type() {
56  BulletShape::init_type();
57  register_type(_type_handle, "BulletConvexHullShape",
58  BulletShape::get_class_type());
59  }
60  virtual TypeHandle get_type() const {
61  return get_class_type();
62  }
63  virtual TypeHandle force_init_type() {
64  init_type();
65  return get_class_type();
66  }
67 
68 private:
69  static TypeHandle _type_handle;
70 };
71 
72 #include "bulletConvexHullShape.I"
73 
74 #endif // __BULLET_CONVEX_HULL_SHAPE_H__
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
A container for geometry primitives.
Definition: geom.h:58
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85