Back to index

nux  3.0.0
MeshData.h
Go to the documentation of this file.
00001 #ifndef MESHDATA_H
00002 #define MESHDATA_H
00003 
00004 namespace nux
00005 {
00006   enum NuxMeshPrimitiveType
00007   {
00008     NUX_MESH_PRIMITIVE_UNKNOWN = 0,
00009     NUX_MESH_TRIANGLE,
00010     NUX_MESH_TRIANGLE_STRIP,
00011     NUX_MESH_TRIANGLE_FAN,
00012     NUX_MESH_LINE,
00013     NUX_MESH_LINE_STRIP,
00014     NUX_MESH_LINE_LOOP,
00015     NUX_MESH_POINT,
00016     NUX_MESH_QUAD,
00017     NUX_MESH_QUAD_STRIP,
00018   };
00019 
00020   class MeshData
00021   {
00022   public:
00023     MeshData();
00024     ~MeshData();
00025 
00026     bool Allocate(int num_mesh_primitive, NuxMeshPrimitiveType primitive_type, int num_elements, int element_size);
00027 
00028   public:
00029     unsigned char* _vertex_data;
00030     unsigned char* _index_data;
00031     NuxMeshPrimitiveType _mesh_primitive_type;
00032     int   _num_element;
00033     int   _element_size;
00034     int   _num_index;
00035     int   _index_size;
00036   };
00037 }
00038 
00039 #endif // MESHDATA_H