Panda3D

physxClothMeshDesc.h

00001 // Filename: physxClothMeshDesc.h
00002 // Created by:  enn0x (28Mar10)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef PHYSXCLOTHMESHDESC_H
00016 #define PHYSXCLOTHMESHDESC_H
00017 
00018 #include "pandabase.h"
00019 #include "lpoint3.h"
00020 #include "lpoint2.h"
00021 #include "nodePath.h"
00022 #include "plist.h"
00023 
00024 #include "physx_includes.h"
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //       Class : PhysxClothMeshDesc
00028 // Description :
00029 ////////////////////////////////////////////////////////////////////
00030 class EXPCL_PANDAPHYSX PhysxClothMeshDesc {
00031 
00032 PUBLISHED:
00033   INLINE PhysxClothMeshDesc();
00034   INLINE ~PhysxClothMeshDesc();
00035 
00036   INLINE bool is_valid() const;
00037 
00038   void set_num_vertices(unsigned int n);
00039   void set_vertex(unsigned int idx,
00040                   const LPoint3f &vert, const LPoint2f &texcoord);
00041 
00042   void set_num_triangles(unsigned int n);
00043   void set_triangle(unsigned int idx,
00044                     unsigned int i1, unsigned int i2, unsigned int i3);
00045 
00046   void set_from_node_path(const NodePath &np);
00047 
00048 public:
00049   INLINE const NxClothMeshDesc &get_desc() const;
00050   INLINE const plist<LPoint2f> get_texcoords() const;
00051 
00052 private:
00053   NxClothMeshDesc _desc;
00054   NxVec3 *_points;
00055   NxU32 *_triangles;
00056 
00057   LPoint2f *_texcoords;
00058 };
00059 
00060 #include "physxClothMeshDesc.I"
00061 
00062 #endif // PHYSXCLOTHMESHDESC_H
 All Classes Functions Variables Enumerations