Main Page   Class Hierarchy   Compound List   File List   Compound Members  

Scene.h

00001 // Mesh Algorithms: a library of algorithms to manipulate 3D meshes
00002 // Copyright (C) 2001 Tim Garthwaite and Jason Reposa
00003 
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public
00006 // License as published by the Free Software Foundation; either
00007 // version 2.1 of the License, or (at your option) any later version.
00008 
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // Lesser General Public License for more details.
00013 
00014 // You should have received a copy of the GNU Lesser General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 
00018 #ifndef SCENE_H
00019 #define SCENE_H
00020 
00021 #include <iostream>
00022 #include <vector>
00023 #include <cmath>
00024 #include "Model.h"
00025 #include "Vertex.h"
00026 #include "Point.h"
00027 #include "Vector.h"
00028 #include "Light.h"
00029 
00031 class Scene {
00032 
00034   std::vector <Model> models;
00035 
00037   std::vector <Light> lights;
00038 
00039   GLfloat ROT_STEP;
00040   GLfloat TRANS_STEP;
00041   GLfloat FRUSTRUM_DEPTH;
00042   GLfloat NORMAL_LENGTH;
00043   Point center; 
00044   GLfloat backUp;
00045   GLint count;
00046   GLfloat diffuseRed;
00047   GLfloat diffuseGreen;
00048   GLfloat diffuseBlue;
00049   bool scene_is_null;
00050 
00051  public:
00052   Scene(); 
00053 
00055   GLvoid addModel(Model * m);
00056 
00058   GLvoid removeModel(Model * m);
00059 
00061   Model * m(GLint m);
00062 
00064   GLint numModels();
00065 
00067   GLvoid addLight(Light * l);
00068 
00070   Light * l(GLint l);
00071 
00073   GLint numLights();
00074 
00076   Point getCenter();
00077 
00079   GLfloat getBackUp();
00080 
00082   GLfloat getRotStep();
00083 
00085   GLfloat getTransStep();
00086 
00088   GLfloat getFrustrumDepth();
00089 
00091   GLfloat getNormalLength();
00092 
00094   GLint getCount();
00095 
00097   GLvoid analyzeScene();
00098 
00100   bool isFullyFunctional();
00101 
00103   std::string toString();
00104 };
00105 
00106 #endif

Generated on Fri Dec 21 00:16:48 2001 for Mesh Decimation by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001