00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef PHYSXTRIANGLEMESHDESC_H
00016 #define PHYSXTRIANGLEMESHDESC_H
00017
00018 #include "pandabase.h"
00019 #include "nodePath.h"
00020 #include "luse.h"
00021
00022 #include "physx_includes.h"
00023
00024
00025
00026
00027
00028 class EXPCL_PANDAPHYSX PhysxTriangleMeshDesc {
00029
00030 PUBLISHED:
00031 INLINE PhysxTriangleMeshDesc();
00032 INLINE ~PhysxTriangleMeshDesc();
00033
00034 INLINE bool is_valid() const;
00035
00036 void set_num_vertices(unsigned int n);
00037 void set_vertex(unsigned int idx, const LPoint3f &vert);
00038
00039 void set_num_triangles(unsigned int n, bool use_material_indices=false);
00040 void set_triangle(unsigned int idx,
00041 unsigned int i1, unsigned int i2, unsigned int i3,
00042 unsigned int material_index=1);
00043
00044 void set_from_node_path(const NodePath &np);
00045
00046 public:
00047 const NxTriangleMeshDesc &get_desc() const;
00048
00049 private:
00050 NxVec3 *_vertices;
00051 NxU32 *_triangles;
00052 NxMaterialIndex *_materials;
00053 NxTriangleMeshDesc _desc;
00054 };
00055
00056 #include "physxTriangleMeshDesc.I"
00057
00058 #endif // PHYSXTRIANGLEMESHDESC_H