Panda3D
 All Classes Functions Variables Enumerations
physxTriangleMeshShape.h
1 // Filename: physxTriangleMeshShape.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 PHYSXTRIANGLEMESHSHAPE_H
16 #define PHYSXTRIANGLEMESHSHAPE_H
17 
18 #include "pandabase.h"
19 
20 #include "physxShape.h"
21 #include "physx_includes.h"
22 
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : PhysxTriangleMeshShape
27 // Description : A shapes which is used to represent an instance of
28 // an convex mesh.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDAPHYSX PhysxTriangleMeshShape : public PhysxShape {
31 
32 PUBLISHED:
33  INLINE PhysxTriangleMeshShape();
34  INLINE ~PhysxTriangleMeshShape();
35 
36  void save_to_desc(PhysxTriangleMeshShapeDesc &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  NxTriangleMeshShape *_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, "PhysxTriangleMeshShape",
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 "physxTriangleMeshShape.I"
71 
72 #endif // PHYSXTRIANGLEMESHSHAPE_H
Descriptor class for PhysxTriangleMeshShape.
Abstract base class for shapes.
Definition: physxShape.h:41
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
A shapes which is used to represent an instance of an convex mesh.