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 "luse.h"
00020 #include "nodePath.h"
00021 #include "plist.h"
00022 
00023 #include "physx_includes.h"
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : PhysxClothMeshDesc
00027 // Description :
00028 ////////////////////////////////////////////////////////////////////
00029 class EXPCL_PANDAPHYSX PhysxClothMeshDesc {
00030 
00031 PUBLISHED:
00032   INLINE PhysxClothMeshDesc();
00033   INLINE ~PhysxClothMeshDesc();
00034 
00035   INLINE bool is_valid() const;
00036 
00037   void set_num_vertices(unsigned int n);
00038   void set_vertex(unsigned int idx,
00039                   const LPoint3f &vert, const LPoint2f &texcoord);
00040 
00041   void set_num_triangles(unsigned int n);
00042   void set_triangle(unsigned int idx,
00043                     unsigned int i1, unsigned int i2, unsigned int i3);
00044 
00045   void set_from_node_path(const NodePath &np);
00046 
00047 public:
00048   INLINE const NxClothMeshDesc &get_desc() const;
00049   INLINE const plist<LPoint2f> get_texcoords() const;
00050 
00051 private:
00052   NxClothMeshDesc _desc;
00053   NxVec3 *_points;
00054   NxU32 *_triangles;
00055 
00056   LPoint2f *_texcoords;
00057 };
00058 
00059 #include "physxClothMeshDesc.I"
00060 
00061 #endif // PHYSXCLOTHMESHDESC_H
 All Classes Functions Variables Enumerations