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

aeEngine Class Reference

Interface to the engine. More...

#include <engine.h>

Inheritance diagram for aeEngine:

aeBase List of all members.

Public Member Functions

 aeEngine (aeRegistry *aeReg)
void initGL ()
 Initialize OpenGL.

bool openApplication ()
 Initialize and open a window.

int getScreenWidth () const
 Get the screen width.

int getScreenHeight () const
 Get the screen height.

aeCameragetCamera () const
 Get the camera.

bool resizeWindow (int new_width, int new_height)
 Resize the window.

void render ()
 Render the screen.

bool defaultRunLoop ()
 Enter the default runloop.

void addObject (aeObject *)
 Add an object to the engine.

void registerEventHandler (aeEventHandlerCallback)
 Register a event handler callback function.

void attachCamera (aeCamera *)
 Attach a camera to the engine.

void toggleFullScreen ()
 Toggle fullscreen on/off.

aeObjectfindObject (unsigned int)
 Find object by ID.

aeObjectfindObjectByName (char *)
 Find object by name.

unsigned int getObjectCount ()
 Get the number of objects in the engine.

aeTexturefindTexture (unsigned int)
 Find texture by ID.

aeTexturefindTextureByName (char *)
 Find texture by name.

unsigned int getTextureCount ()
 Get the number of textures in the engine.

void TempQuit ()

Private Member Functions

void prepareRender ()
void finishRender ()
void buildEventStruct (SDL_Event *, aeEvent *)

Private Attributes

aeRegistryaereg
SDL_Surface * screen
SDL_Event event
bool(* EventHandlerCallback )(aeEvent &)
bool hasEventHandler
bool done
bool isActive
aeEngineflagseflags

Detailed Description

Interface to the engine.

This is the main interface to the AE 3D engine.

Definition at line 44 of file engine.h.


Member Function Documentation

void aeEngine::addObject aeObject  
 

Add an object to the engine.

You should only use this when you create your own geometry with e.g. aePolygon or aeTriangle. You do not need to add geometry loaded with e.g. the model loader plugin or the terrain plugin because the plugin will take care of that.

Parameters:
aeObject * The object to add.
See also:
aeLine, aePolygon, aeTriangle, aeQuad

void aeEngine::attachCamera aeCamera  
 

Attach a camera to the engine.

Parameters:
aeCamera * A camera object.

bool aeEngine::defaultRunLoop  
 

Enter the default runloop.

Usually you call this after all other initialization to enter the default runloop.

Returns:
True if the runloop was exited normally, false if not.

aeObject* aeEngine::findObject unsigned    int
 

Find object by ID.

This is only a wrapper around aeRegistry::FindObject().

Parameters:
int Object ID to query.
Returns:
The object, or NULL if it's not found.

aeObject* aeEngine::findObjectByName char *   
 

Find object by name.

This is only a wrapper around aeRegistry::FindObjectByName().

Parameters:
char * Object name.
Returns:
The object, or NULL if it's not found.

aeTexture* aeEngine::findTexture unsigned    int
 

Find texture by ID.

This is only a wrapper around aeRegistry::FindTexture().

Parameters:
int Texture ID to query.
Returns:
The texture object, or NULL if it's not found.

aeTexture* aeEngine::findTextureByName char *   
 

Find texture by name.

This is only a wrapper around aeRegistry::FindTextureByName().

Parameters:
char * Texture name.
Returns:
The texture object, or NULL if it's not found.

aeCamera* aeEngine::getCamera   const [inline]
 

Get the camera.

You must call AttachCamera() first to attach a camera.

Returns:
The camera object.

Definition at line 105 of file engine.h.

unsigned int aeEngine::getObjectCount  
 

Get the number of objects in the engine.

This is only a wrapper around aeRegistry::NumObjects().

Returns:
The number of objects.

int aeEngine::getScreenHeight   const [inline]
 

Get the screen height.

Returns:
The screen height.

Definition at line 96 of file engine.h.

int aeEngine::getScreenWidth   const [inline]
 

Get the screen width.

Returns:
The screen width.

Definition at line 88 of file engine.h.

unsigned int aeEngine::getTextureCount  
 

Get the number of textures in the engine.

This is only a wrapper around aeRegistry::NumTextures().

Returns:
The number of textures.

void aeEngine::initGL  
 

Initialize OpenGL.

This is called automagically in OpenApplication().

Returns:
True if OpenGL could be initialized, and false on error.

bool aeEngine::openApplication  
 

Initialize and open a window.

Returns:
True if window was created succesfully, false if not.

void aeEngine::registerEventHandler aeEventHandlerCallback   
 

Register a event handler callback function.

Parameters:
aeEventHandlerCallback Static event handler callback function.

void aeEngine::render  
 

Render the screen.

You must call this upon aeevProcessFrame to get anything drawn on the screen.

bool aeEngine::resizeWindow int    new_width,
int    new_height
 

Resize the window.

This should be called upon aeevResize event to resize the window.

Parameters:
new_width New window width.
new_height New window height.
Returns:
True if the window was resized succesfully, false if not.

void aeEngine::toggleFullScreen  
 

Toggle fullscreen on/off.


The documentation for this class was generated from the following file:
AE Engine Public API Reference
Generated on Wed Apr 9 09:43:40 2003 by Doxygen.