Panda3D
 All Classes Functions Variables Enumerations
physxClothMeshDesc.h
1 // Filename: physxClothMeshDesc.h
2 // Created by: enn0x (28Mar10)
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 PHYSXCLOTHMESHDESC_H
16 #define PHYSXCLOTHMESHDESC_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 #include "nodePath.h"
21 #include "plist.h"
22 
23 #include "physx_includes.h"
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : PhysxClothMeshDesc
27 // Description :
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDAPHYSX PhysxClothMeshDesc {
30 
31 PUBLISHED:
32  INLINE PhysxClothMeshDesc();
33  INLINE ~PhysxClothMeshDesc();
34 
35  INLINE bool is_valid() const;
36 
37  void set_num_vertices(unsigned int n);
38  void set_vertex(unsigned int idx,
39  const LPoint3f &vert, const LPoint2f &texcoord);
40 
41  void set_num_triangles(unsigned int n);
42  void set_triangle(unsigned int idx,
43  unsigned int i1, unsigned int i2, unsigned int i3);
44 
45  void set_from_node_path(const NodePath &np);
46 
47 public:
48  INLINE const NxClothMeshDesc &get_desc() const;
49  INLINE const plist<LPoint2f> get_texcoords() const;
50 
51 private:
52  NxClothMeshDesc _desc;
53  NxVec3 *_points;
54  NxU32 *_triangles;
55 
56  LPoint2f *_texcoords;
57 };
58 
59 #include "physxClothMeshDesc.I"
60 
61 #endif // PHYSXCLOTHMESHDESC_H
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
This is our own Panda specialization on the default STL list.
Definition: plist.h:38
This is a two-component point in space.
Definition: lpoint2.h:92
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition: nodePath.h:165