MySimpleMesh.h

Go to the documentation of this file.
00001 #ifndef MYSIMPLEMESH_H
00002 #define MYSIMPLEMESH_H
00003 
00004 #include <vector>
00005 #include <list>
00006 
00007 struct MyVertex
00008 {
00009   float x;
00010   float y;
00011   float z;
00012 };
00013 
00014 typedef std::list<unsigned int> MyFace;
00015 
00016 // MySimpleMesh class.
00017 
00018 class MySimpleMesh
00019 {
00020 public:
00021   MySimpleMesh();
00022   ~MySimpleMesh();
00023   
00024   void addVertex(float x, float y, float z);
00025   void addFace(const std::list<unsigned int> &indexes);
00026   void print() const;
00027   
00028   inline std::vector<MyVertex> &getVertexArray() {return _vertexArray;};
00029   inline std::vector<MyFace> &getIndexArray() {return _indexArray;};
00030   
00031 private:
00032   std::vector<MyVertex> _vertexArray;
00033   std::vector<MyFace> _indexArray;
00034 };
00035 
00036 #endif

Generated on Mon Jul 12 09:40:00 2004 for X3DToolKit by doxygen 1.3.6