EntitySet.h

Go to the documentation of this file.
00001 #ifndef ENTITYSET_H
00002 #define ENTITYSET_H
00003 
00011 #include "Entity.h"
00012 
00013 #include <vector>
00014 
00015 #ifndef BUILDING_DOX
00016 # ifndef NDEBUG
00017 #   include <iostream>
00018 #   include "PatchSequenceEnumerator.h"
00019 # endif
00020 
00021   class PatchRandomAccessEnumerator;
00022   class TriangleSetExt;
00023 #endif
00024 
00028 class EntitySet {
00029   public:
00035     void add(Entity *entity);
00036 
00040     void divide(float size);
00041 
00046     PatchSequenceEnumerator* createPatchSequenceEnumerator();
00047 
00052     size_t count();
00053 
00059     Entity& operator[] (unsigned index);
00060     
00064     TriangleSetExt* computeVertexColors();
00065 
00066 private:
00067     typedef std::vector<Entity> TContainer;
00068     TContainer container_;
00069 };
00070 
00071 #ifndef NDEBUG
00072 
00079 inline std::ostream& operator<< (std::ostream &out, EntitySet &entitySet) {
00080   PatchSequenceEnumerator *pe= entitySet.createPatchSequenceEnumerator();
00081   Triangle *t;
00082   while (0!= (t= pe->nextPatch()))
00083     out << *t;
00084   
00085   delete pe;
00086   return out;
00087 }
00088 #endif
00089 
00090 #endif // ENTITYSET_H

Generated on Thu Dec 6 19:33:11 2007 for Radiosity Renderer and Visualizer by  doxygen 1.5.2