omegalib  13.1
omega::Engine Class Reference

The omegalib Engine is the core runtime component of omegalib. More...

#include <Engine.h>

Public Types

typedef List< Ref< Camera > > CameraCollection
 

Public Member Functions

 Engine (ApplicationBase *app)
 
virtual ~Engine ()
 
ServiceManagergetServiceManager ()
 
SystemManagergetSystemManager ()
 
ApplicationBasegetApplication ()
 
DisplaySystemgetDisplaySystem ()
 
int getCanvasWidth ()
 
int getCanvasHeight ()
 
SceneNodegetScene ()
 
virtual void initialize ()
 
virtual void dispose ()
 
void reset ()
 Resets the omegalib engine to its initial state. More...
 
void setEventDispatchEnabled (bool value)
 Set to true by default. More...
 
bool isEventDispatchEnabled ()
 
virtual void handleEvent (const Event &evt)
 
virtual void update (const UpdateContext &context)
 
bool handleCommand (const String &cmd)
 
void addRenderer (Renderer *client)
 Renderer management. More...
 
RenderergetRendererByContextId (int id)
 
RendererListgetRendererList ()
 
void removeRenderPass (const String &renderPassName)
 
CameragetDefaultCamera ()
 Camera management. More...
 
void setDefaultCamera (Camera *camera)
 
CameracreateCamera (uint flags=Camera::DefaultFlags)
 
CameracreateCamera (const String &name, uint flags=Camera::DefaultFlags)
 
void destroyCamera (Camera *cam)
 
CameragetCamera (const String &name)
 
CameragetCameraById (int id)
 
CameraCollection getCameras ()
 
CameraCollection getCameras () const
 
void setDefaultFont (const FontInfo &font)
 Font management. More...
 
const FontInfogetDefaultFont ()
 
const SceneQueryResultListquerySceneRay (const Ray &ray, uint flags=0)
 Scene query. More...
 
bool getDrawPointers ()
 Pointer management. More...
 
void setDrawPointers (bool value)
 
PointergetPointer (int id)
 
ConsolegetConsole ()
 Console management. More...
 
void initializeSound ()
 Sound management. More...
 
SoundManagergetSoundManager ()
 
SoundEnvironmentgetSoundEnvironment ()
 
bool isSoundEnabled ()
 This is only used to indicate if sound was enabled via configuration If this is true, we assume the master node is connected/connecting to the sound server. More...
 
void addQuickCommand (const String &cmd, const String &call, int args, const String &description)
 Quick commands. More...
 
void removeQuickCommand (const String &cmd)
 
- Public Member Functions inherited from omicron::ReferenceType
 ReferenceType ()
 
virtual ~ReferenceType ()
 
void ref ()
 
void unref ()
 
long refCount ()
 

Static Public Member Functions

static Engineinstance ()
 
- Static Public Member Functions inherited from omicron::ReferenceType
static void printObjCounts ()
 

Static Public Attributes

static const int MaxActivePointers = 128
 

Friends

class Renderer
 

Additional Inherited Members

- Static Protected Attributes inherited from omicron::ReferenceType
static List< ReferenceType * > mysObjList
 

Detailed Description

The omegalib Engine is the core runtime component of omegalib.

It runs on each node of a cluster system and handles the abstract scene graph, cameras, distribution of events and frame updates.

+ Inheritance diagram for omega::Engine:

Member Typedef Documentation

Constructor & Destructor Documentation

omega::Engine::Engine ( ApplicationBase app)
virtual omega::Engine::~Engine ( )
virtual

Member Function Documentation

void omega::Engine::addQuickCommand ( const String cmd,
const String call,
int  args,
const String description 
)

Quick commands.

void omega::Engine::addRenderer ( Renderer client)

Renderer management.

Camera* omega::Engine::createCamera ( uint  flags = Camera::DefaultFlags)
Camera* omega::Engine::createCamera ( const String name,
uint  flags = Camera::DefaultFlags 
)
void omega::Engine::destroyCamera ( Camera cam)
virtual void omega::Engine::dispose ( )
virtual
ApplicationBase* omega::Engine::getApplication ( )
inline
Camera* omega::Engine::getCamera ( const String name)
Camera* omega::Engine::getCameraById ( int  id)
CameraCollection omega::Engine::getCameras ( )
CameraCollection omega::Engine::getCameras ( ) const
int omega::Engine::getCanvasHeight ( )
int omega::Engine::getCanvasWidth ( )
Console * omega::Engine::getConsole ( )
inline

Console management.

Camera * omega::Engine::getDefaultCamera ( )
inline

Camera management.

const FontInfo & omega::Engine::getDefaultFont ( )
inline
DisplaySystem* omega::Engine::getDisplaySystem ( )
inline
bool omega::Engine::getDrawPointers ( )
inline

Pointer management.

Pointer* omega::Engine::getPointer ( int  id)
Renderer* omega::Engine::getRendererByContextId ( int  id)
RendererList & omega::Engine::getRendererList ( )
inline
SceneNode* omega::Engine::getScene ( )
ServiceManager * omega::Engine::getServiceManager ( )
inline
SoundEnvironment * omega::Engine::getSoundEnvironment ( )
inline
SoundManager * omega::Engine::getSoundManager ( )
inline
SystemManager* omega::Engine::getSystemManager ( )
inline
bool omega::Engine::handleCommand ( const String cmd)
virtual void omega::Engine::handleEvent ( const Event evt)
virtual
virtual void omega::Engine::initialize ( )
virtual
void omega::Engine::initializeSound ( )

Sound management.

static Engine* omega::Engine::instance ( )
inlinestatic
bool omega::Engine::isEventDispatchEnabled ( )
inline
bool omega::Engine::isSoundEnabled ( )
inline

This is only used to indicate if sound was enabled via configuration If this is true, we assume the master node is connected/connecting to the sound server.

Used to enable the sound volume Python menu.

const SceneQueryResultList& omega::Engine::querySceneRay ( const Ray ray,
uint  flags = 0 
)

Scene query.

void omega::Engine::removeQuickCommand ( const String cmd)
void omega::Engine::removeRenderPass ( const String renderPassName)
void omega::Engine::reset ( )

Resets the omegalib engine to its initial state.

Useful for runtime application switching.

void omega::Engine::setDefaultCamera ( Camera camera)
inline
void omega::Engine::setDefaultFont ( const FontInfo font)
inline

Font management.

void omega::Engine::setDrawPointers ( bool  value)
inline
void omega::Engine::setEventDispatchEnabled ( bool  value)

Set to true by default.

When set to false, the engine will ignore all input events.

virtual void omega::Engine::update ( const UpdateContext context)
virtual

Friends And Related Function Documentation

friend class Renderer
friend

Member Data Documentation

const int omega::Engine::MaxActivePointers = 128
static

The documentation for this class was generated from the following file: