gee_group.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 /* COPYRIGHT
00004  *
00005  * This file is part of the Visual Effects Engine - VEE
00006  *
00007  * Read the "VEE-LICENSE" file for the license.
00008  *
00009  * Authors & Copyright:   
00010  *
00011  * Tommi Ilmonen, Tuukka Heikura, Marko Myllymaa and 
00012  * Janne Kontkanen 2001-2004
00013  *
00014  * Additional copyrights: Tekes 2003-2004
00015  *
00016  * firstname.lastname@hut.fi
00017  *
00018  */
00019 
00020 #ifndef GEE_GROUP_H
00021 #define GEE_GROUP_H
00022 
00023 #include <gee_geometry.h>
00024 
00025 #include <vee_reference_object.h>
00026 
00027 #include <set>
00028 
00029 class GEE_Group : public GEE_Geometry
00030 {
00031 public:
00032   typedef id_container::iterator iterator;
00033 
00034   GEE_Group();
00035   virtual ~GEE_Group();
00036 
00037   virtual id_container * getExtraIds();
00038 
00039   static GEE_Geometry * create();
00040   virtual GEE_Geometry * clone() const;
00041   virtual GEE_Geometry * copy(GEE_World *target, id_remap * remap) const;
00042   virtual void erase();
00043   virtual bool eraseData(GEE_Containment *);
00044   virtual bool intersects(GEE_Containment *);
00045   virtual void selectVertices(GEE_Containment *,  
00046             uint mask, 
00047             uint values);
00048   virtual void selectFaces(GEE_Containment *,  
00049          uint mask, 
00050          uint values);
00051   virtual bool colorData(GEE_ReColor *);
00052   virtual bool moveData(GEE_Mover *);
00053   virtual void render(GEE_Renderer *);
00054   virtual bool getBoundingBox(VEE_BoundingBox *);
00055   virtual bool move(const VEE_Vector3 & offset);
00056   virtual void setMaterial(const GEE_Material &m);
00057 
00058   virtual bool read(GEE_Io * );
00059   virtual bool write(GEE_Io *);
00060   virtual bool finalizeRead();
00061 
00062   virtual void setSelectionState(uint s);
00063 
00064   void clear();
00065   
00066   void addChild(GEE_id_t id);
00067   void breakGroup();
00068 
00069   uint childCount() const { return m_children.size(); }
00070 
00071   iterator begin() { return m_children.begin(); }
00072   iterator end()   { return m_children.end(); }
00073 
00074   static GEE_id_t getGeometryId(iterator & it) { return  *it; }
00075   // static std::string getGeometryName(iterator & it) { return  (*it).first; }
00076   VEE_RefPtr<GEE_Geometry> * getGeometry(iterator & it);
00077 
00078   bool loadModel(const char *filename, bool verbose = true);
00079 
00080   bool loadLightwaveObj(const char *filename, bool verbose = true);
00081   bool loadWavefrontObj(const char *filename, bool verbose = true);
00082 
00083   void convertPolygonsToTriangles();
00084 
00085   uint size() const { return m_children.size(); }
00086 
00087 protected:
00088 
00089   id_container m_children;
00090 
00091 };
00092 
00093 #endif

Generated on Mon Mar 12 21:09:00 2007 for VEE - The Visual Effects Engine by  doxygen 1.4.6