IDrawObjectEngine

The interface of the IDrawObject engine.  The IDrawObjectEngine maintains a database of IDrawObjects that have been provided by the loaded RuleSets.  Whenever a new IGameObject is created by an IRule, the IDrawObjectEngine is called via CreateDrawObject, to create an IDrawObject for the new IGameObject so that it can be drawn on screen.  IDrawObjectEngine also has two functions, ObtainAll and ReleaseAll, that allow all stored IDrawObjects in the database to do their own resource acquisition and release.  These functions must be called exactly once per Cities3D game.  The IDrawObjectEngine is accessible through the GameEngine.

Project

RulesCore

Include

IDrawObjectEngine.h

Summary
The interface of the IDrawObject engine.
Creates a new IDrawObject capable of drawing the given IGameObject.
Lets all IDrawObjects obtain needed resources.
Lets all IDrawObjects release acquired resources.
The IDrawObjectEngine destructor.

Public

Summary
Creates a new IDrawObject capable of drawing the given IGameObject.
Lets all IDrawObjects obtain needed resources.
Lets all IDrawObjects release acquired resources.

Pure Virtual Functions

CreateDrawObject

virtual DrawObjectPtr CreateDrawObject(const GameObjectPtr &object) const=0

Creates a new IDrawObject capable of drawing the given IGameObject.

Parameters

objectThe IGameObject for which an IDrawObject is needed.

Returns

A newly cloned IDrawObject that can draw the IGameObject.  May be NULL if no capable IDrawObject was found.

ObtainAll

virtual void ObtainAll()=0

Lets all IDrawObjects obtain needed resources.

ReleaseAll

virtual void ReleaseAll()=0

Lets all IDrawObjects release acquired resources.

Protected

Summary
The IDrawObjectEngine destructor.

Destructor

~IDrawObjectEngine

virtual ~IDrawObjectEngine()=0

The IDrawObjectEngine destructor.  It is pure virtual because this class must be derived from in order to be used.

The interface for objects that are drawn on screen.
virtual DrawObjectPtr CreateDrawObject(const GameObjectPtr &object) const=0
Creates a new IDrawObject capable of drawing the given IGameObject.
An interface for all game objects.
virtual void ObtainAll()=0
Lets all IDrawObjects obtain needed resources.
virtual void ReleaseAll()=0
Lets all IDrawObjects release acquired resources.
virtual ~IDrawObjectEngine()=0
The IDrawObjectEngine destructor.
A repository of all things rules-related.
The interface for a single game rule.
The interface of the IDrawObject engine.
The engine that drives the game.
RulesCore is the HOSS of Cities3D.