Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

World.h

00001 /*
00002   File: World.h
00003 
00004   Copyright(C) C. Kotterink, Computed Graphics
00005 */
00006 #ifndef WORLD_H
00007 #define WORLD_H
00008 
00009 #include<ObjectGroup.h>
00010 #include<Sky.h>
00011 #include<RenderContext.h>
00012 #include<ParticleManager.h>
00013 #include<Vertex3.h>
00014 
00015 class CollisionHull;
00016 
00019 class World : public ObjectGroup
00020 {
00021 public:
00022     World();
00023     virtual ~World();
00024 
00025     float dTime() {
00026         return dT;
00027     }
00028     float getTime() {
00029         return time;
00030     }
00031     Vertex3 &getGravity() {
00032         return gravity;
00033     }
00034     const string &getName() const {
00035         return name;
00036     }
00037     void setName(const string &n) {
00038         name = n;
00039     }
00040     void addParticleSystem(ParticleSystem *sytem) {
00041         particleManager.addParticleSystem(sytem);
00042     }
00043     void deleteParticleSystem(ParticleSystem *sytem) {
00044         particleManager.deleteParticleSystem(sytem);
00045     }
00046 
00047     bool update();
00048 
00049     // Sky
00050     void renderSky(RenderContext &rc);
00051     Sky *getSky() {
00052         return sky;
00053     }
00054     void setSky(Sky *s) {
00055         delete sky;
00056         sky = s;
00057     }
00058     // Object
00059     void render(
00060         RenderContext &rc,
00061         RenderContext::Visibility visibility = RenderContext::PartlyVisible
00062     );
00063     void write(WDFFile &f);
00064     void readChunk(WDFFile::Chunk &chunk, WDFFile &f);
00065 
00066 private:
00067     typedef ObjectGroup super;
00068 
00069     ParticleManager particleManager;
00070     Sky *sky;
00071     Vertex3 gravity;
00072     string name;
00073     float time;
00074     float dT;
00075 };
00076 #endif

This documentation was generated using doxygen. If you have any comments or additions please mail me.