Panda3D
 All Classes Functions Variables Enumerations
bulletPlaneShape.h
1 // Filename: bulletPlaneShape.h
2 // Created by: enn0x (23Jan10)
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_PLANE_SHAPE_H__
16 #define __BULLET_PLANE_SHAPE_H__
17 
18 #include "pandabase.h"
19 
20 #include "bullet_includes.h"
21 #include "bullet_utils.h"
22 #include "bulletShape.h"
23 
24 #include "collisionPlane.h"
25 #include "luse.h"
26 
27 ////////////////////////////////////////////////////////////////////
28 // Class : BulletPlaneShape
29 // Description :
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDABULLET BulletPlaneShape : public BulletShape {
32 
33 PUBLISHED:
34  BulletPlaneShape(const LVector3 &normal, PN_stdfloat constant);
35  INLINE BulletPlaneShape(const BulletPlaneShape &copy);
36  INLINE void operator = (const BulletPlaneShape &copy);
37  INLINE ~BulletPlaneShape();
38 
39  INLINE LVector3 get_plane_normal() const;
40  INLINE PN_stdfloat get_plane_constant() const;
41 
42  static BulletPlaneShape *make_from_solid(const CollisionPlane *solid);
43 
44 public:
45  virtual btCollisionShape *ptr() const;
46 
47 private:
48  btStaticPlaneShape *_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, "BulletPlaneShape",
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 "bulletPlaneShape.I"
73 
74 #endif // __BULLET_PLANE_SHAPE_H__
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