00001 #ifndef sw_VertexListH
00002 #define sw_VertexListH
00003
00004
00005 #include "glew.h"
00006
00008
00012 struct TVertex{
00013 GLfloat x,y,z;
00014 GLfloat nx,ny,nz;
00015 };
00016
00017
00018 typedef unsigned int uint;
00019
00028 class CVertexList
00029 {
00030 private:
00031 TVertex* Vertices;
00032 uint VertexCount;
00033 GLvoid AllocVertices();
00034 TVertex *GetVertices();
00035
00036 public:
00041 CVertexList(uint c_VertexCount=0);
00042 ~CVertexList();
00043
00049 TVertex& operator[] (uint index);
00050
00055 GLvoid SetVertexCount(uint p_VertexCount);
00056
00062 GLvoid SetVertex(uint n,TVertex v);
00063
00071 GLvoid SetVertex(uint n,GLfloat vx,GLfloat vy,GLfloat vz);
00072
00081 GLvoid SetVertexNormal(uint n,GLfloat nx,GLfloat ny,GLfloat nz,bool normalize=true);
00082
00086 GLvoid FreeVertices();
00087
00088 };
00089
00090
00091 #endif