Panda3D
 All Classes Functions Variables Enumerations
physxConvexMesh.h
1 // Filename: physxConvexMesh.h
2 // Created by: enn0x (13Oct09)
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 PHYSXCONVEXMESH_H
16 #define PHYSXCONVEXMESH_H
17 
18 #include "pandabase.h"
19 
20 #include "physxObject.h"
21 #include "physx_includes.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : PhysxConvexMesh
25 // Description : A Convex Mesh. Internally represented as a list of
26 // convex polygons. The number of polygons is
27 // limited to 256.
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDAPHYSX PhysxConvexMesh : public PhysxObject {
30 
31 PUBLISHED:
32  unsigned int get_reference_count() const;
33 
34 ////////////////////////////////////////////////////////////////////
35 PUBLISHED:
36  void release();
37 
38  INLINE void ls() const;
39  INLINE void ls(ostream &out, int indent_level=0) const;
40 
41 public:
42  INLINE PhysxConvexMesh();
43  INLINE ~PhysxConvexMesh();
44 
45  INLINE NxConvexMesh *ptr() const { return _ptr; };
46 
47  void link(NxConvexMesh *meshPtr);
48  void unlink();
49 
50 private:
51  NxConvexMesh *_ptr;
52 
53 ////////////////////////////////////////////////////////////////////
54 public:
55  static TypeHandle get_class_type() {
56  return _type_handle;
57  }
58  static void init_type() {
59  PhysxObject::init_type();
60  register_type(_type_handle, "PhysxConvexMesh",
61  PhysxObject::get_class_type());
62  }
63  virtual TypeHandle get_type() const {
64  return get_class_type();
65  }
66  virtual TypeHandle force_init_type() {
67  init_type();
68  return get_class_type();
69  }
70 
71 private:
72  static TypeHandle _type_handle;
73 };
74 
75 #include "physxConvexMesh.I"
76 
77 #endif // PHYSXCONVEXMESH_H
A Convex Mesh.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85