Panda3D
bulletConvexPointCloudShape.h
1 // Filename: bulletConvexPointCloudShape.h
2 // Created by: enn0x (30Jan10)
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_POINT_CLOUD_SHAPE_H__
16 #define __BULLET_CONVEX_POINT_CLOUD_SHAPE_H__
17 
18 #include "pandabase.h"
19 
20 #include "bullet_includes.h"
21 #include "bulletShape.h"
22 
23 #include "geom.h"
24 #include "pta_LVecBase3.h"
25 
26 ////////////////////////////////////////////////////////////////////
27 // Class : BulletConvexPointCloudShape
28 // Description :
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDABULLET BulletConvexPointCloudShape : public BulletShape {
31 
32 PUBLISHED:
33  BulletConvexPointCloudShape(const PTA_LVecBase3 &points, LVecBase3 scale=LVecBase3(1.));
34  BulletConvexPointCloudShape(const Geom *geom, LVecBase3 scale=LVecBase3(1.));
36  INLINE void operator = (const BulletConvexPointCloudShape &copy);
37  INLINE ~BulletConvexPointCloudShape();
38 
39  INLINE int get_num_points() const;
40 
41 public:
42  virtual btCollisionShape *ptr() const;
43 
44 private:
45  btConvexPointCloudShape *_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, "BulletConvexPointCloudShape",
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 "bulletConvexPointCloudShape.I"
70 
71 #endif // __BULLET_CONVEX_POINT_CLOUD_SHAPE_H__
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:105
A container for geometry primitives.
Definition: geom.h:58
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85