Panda3D
physxClothMeshDesc.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file physxClothMeshDesc.h
10  * @author enn0x
11  * @date 2010-03-28
12  */
13 
14 #ifndef PHYSXCLOTHMESHDESC_H
15 #define PHYSXCLOTHMESHDESC_H
16 
17 #include "pandabase.h"
18 #include "luse.h"
19 #include "nodePath.h"
20 #include "plist.h"
21 
22 #include "physx_includes.h"
23 
24 /**
25  *
26  */
27 class EXPCL_PANDAPHYSX PhysxClothMeshDesc {
28 
29 PUBLISHED:
30  INLINE PhysxClothMeshDesc();
31  INLINE ~PhysxClothMeshDesc();
32 
33  INLINE bool is_valid() const;
34 
35  void set_num_vertices(unsigned int n);
36  void set_vertex(unsigned int idx,
37  const LPoint3f &vert, const LPoint2f &texcoord);
38 
39  void set_num_triangles(unsigned int n);
40  void set_triangle(unsigned int idx,
41  unsigned int i1, unsigned int i2, unsigned int i3);
42 
43  void set_from_node_path(const NodePath &np);
44 
45 public:
46  INLINE const NxClothMeshDesc &get_desc() const;
47  INLINE const plist<LPoint2f> get_texcoords() const;
48 
49 private:
50  NxClothMeshDesc _desc;
51  NxVec3 *_points;
52  NxU32 *_triangles;
53 
54  LPoint2f *_texcoords;
55 };
56 
57 #include "physxClothMeshDesc.I"
58 
59 #endif // PHYSXCLOTHMESHDESC_H
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL list.
Definition: plist.h:35
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition: nodePath.h:161