Panda3D
physxConvexShape.h
1 // Filename: physxConvexShape.h
2 // Created by: enn0x (14Oct09)
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 PHYSXCONVEXSHAPE_H
16 #define PHYSXCONVEXSHAPE_H
17 
18 #include "pandabase.h"
19 
20 #include "physxShape.h"
21 #include "physx_includes.h"
22 
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : PhysxConvexShape
27 // Description : A shapes which is used to represent an instance of
28 // an convex mesh.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDAPHYSX PhysxConvexShape : public PhysxShape {
31 
32 PUBLISHED:
33  INLINE PhysxConvexShape();
34  INLINE ~PhysxConvexShape();
35 
36  void save_to_desc(PhysxConvexShapeDesc &shapeDesc) const;
37 
38 ////////////////////////////////////////////////////////////////////
39 public:
40  INLINE NxShape *ptr() const { return (NxShape *)_ptr; };
41 
42  void link(NxShape *shapePtr);
43  void unlink();
44 
45 private:
46  NxConvexShape *_ptr;
47 
48 ////////////////////////////////////////////////////////////////////
49 public:
50  static TypeHandle get_class_type() {
51  return _type_handle;
52  }
53  static void init_type() {
54  PhysxShape::init_type();
55  register_type(_type_handle, "PhysxConvexShape",
56  PhysxShape::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 "physxConvexShape.I"
71 
72 #endif // PHYSXCONVEXSHAPE_H
Abstract base class for shapes.
Definition: physxShape.h:41
Descriptor class for PhysxConvexShape.
A shapes which is used to represent an instance of an convex mesh.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85