Panda3D
physxTriangleMesh.h
1 // Filename: physxTriangleMesh.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 PHYSXTRIANGLEMESH_H
16 #define PHYSXTRIANGLEMESH_H
17 
18 #include "pandabase.h"
19 
20 #include "physxObject.h"
21 #include "physx_includes.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : PhysxTriangleMesh
25 // Description :
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_PANDAPHYSX PhysxTriangleMesh : public PhysxObject {
28 
29 PUBLISHED:
30  unsigned int get_reference_count() const;
31 
32 ////////////////////////////////////////////////////////////////////
33 PUBLISHED:
34  void release();
35 
36  INLINE void ls() const;
37  INLINE void ls(ostream &out, int indent_level=0) const;
38 
39 public:
40  INLINE PhysxTriangleMesh();
41  INLINE ~PhysxTriangleMesh();
42 
43  INLINE NxTriangleMesh *ptr() const { return _ptr; };
44 
45  void link(NxTriangleMesh *meshPtr);
46  void unlink();
47 
48 private:
49  NxTriangleMesh *_ptr;
50 
51 ////////////////////////////////////////////////////////////////////
52 public:
53  static TypeHandle get_class_type() {
54  return _type_handle;
55  }
56  static void init_type() {
57  PhysxObject::init_type();
58  register_type(_type_handle, "PhysxTriangleMesh",
59  PhysxObject::get_class_type());
60  }
61  virtual TypeHandle get_type() const {
62  return get_class_type();
63  }
64  virtual TypeHandle force_init_type() {
65  init_type();
66  return get_class_type();
67  }
68 
69 private:
70  static TypeHandle _type_handle;
71 };
72 
73 #include "physxTriangleMesh.I"
74 
75 #endif // PHYSXTRIANGLEMESH_H
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85