[AE Engine logo] Public API Reference
Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

engine.h

00001 /*
00002  *  AE Engine
00003  *
00004  *  Copyright (C) 2003 Riku "Rakkis" Nurminen
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 
00022 #ifndef __AELIB_AEENGINE_ENGINE_H__
00023 #define __AELIB_AEENGINE_ENGINE_H__
00024 
00025 #include <aedefs.h>
00026 #include <aeengine/camera.h>
00027 #include <aeengine/eflags.h>
00028 #include <aeengine/event.h>
00029 #include <aegeom/object.h>
00030 #include <aegfx/texture.h>
00031 #include <aereg/base.h>
00032 #include <aereg/registry.h>
00033 #include <aerenderer/frustum.h>
00034 
00035 class aeCamera;
00036 class aeRegistry;
00037 
00044 class aeEngine: public aeBase {
00045         AECF_CNDEF
00046 
00047  private:
00048         aeRegistry *aereg;
00049         SDL_Surface *screen;
00050         SDL_Event event;
00051         bool (*EventHandlerCallback)(aeEvent &);
00052         bool hasEventHandler;
00053         bool done;
00054         bool isActive;
00055         aeEngineflags *eflags;
00056 
00057         void prepareRender();
00058         void finishRender();
00059         void buildEventStruct(SDL_Event *, aeEvent *);
00060 
00061  public:
00062         aeEngine(aeRegistry *aeReg);
00063         ~aeEngine();
00064 
00072         void initGL();
00073 
00080         bool openApplication();
00081 
00088         int getScreenWidth() const { return screenWidth; }
00089 
00096         int getScreenHeight() const { return screenHeight; }
00097 
00105         aeCamera *getCamera() const { return camera; }
00106 
00115         bool resizeWindow(int new_width, int new_height);
00116 
00122         void render();
00123 
00131         bool defaultRunLoop();
00132 
00142         void addObject(aeObject *);
00143 
00149         void registerEventHandler(aeEventHandlerCallback);
00150 
00156         void attachCamera(aeCamera *);
00157 
00162         void toggleFullScreen();
00163 
00172         aeObject *findObject(unsigned int);
00173 
00182         aeObject *findObjectByName(char *);
00183 
00191         unsigned int getObjectCount();
00192 
00201         aeTexture *findTexture(unsigned int);
00202 
00211         aeTexture *findTextureByName(char *);
00212 
00220         unsigned int getTextureCount();
00221 
00222         void TempQuit();
00223 };
00224 
00225 #endif // __AELIB_AEENGINE_ENGINE_H__

AE Engine Public API Reference
Generated on Wed Apr 9 09:43:39 2003 by Doxygen.