#include <engine.h>
Inheritance diagram for iEngine:
Public Methods | |
virtual csEngine* | GetCsEngine ()=0 |
@@KLUDGE: This will no longer be needed once the iEngine interface is complete. | |
virtual iObject* | QueryObject ()=0 |
Get the iObject for the engine. | |
virtual bool | Prepare (iProgressMeter *meter=NULL)=0 |
Prepare the engine. More... | |
virtual void | ShineLights (iRegion *region=NULL, iProgressMeter *meter=NULL)=0 |
Calculate all lighting information. More... | |
virtual int | GetTextureFormat () const=0 |
Query the format to load textures (usually this depends on texture manager). | |
virtual bool | IsPVS () const=0 |
Return true if engine want to use PVS. | |
virtual void | SelectRegion (const char *iName)=0 |
Create or select a new region (name can be NULL for the default main region). More... | |
virtual void | SelectRegion (iRegion *region)=0 |
Create or select a new region (region can be NULL for the default main region). More... | |
virtual iRegion* | GetCurrentRegion () const=0 |
Get a reference to the current region (or NULL if the default main region is selected). | |
virtual iRegion* | FindRegion (const char *name) const=0 |
Find a region by name. | |
virtual void | DeleteAll ()=0 |
Delete everything in the engine. | |
virtual void | RegisterRenderPriority (const char *name, long priority)=0 |
Register a new render priority. | |
virtual long | GetRenderPriority (const char *name) const=0 |
Get a render priority by name. | |
virtual long | GetSkyRenderPriority () const=0 |
Get the render priority for sky objects (attached to 'sky' name). | |
virtual long | GetWallRenderPriority () const=0 |
Get the render priority for wall objects (attached to 'wall' name). | |
virtual long | GetObjectRenderPriority () const=0 |
Get the render priority for general objects (attached to 'object' name). | |
virtual long | GetAlphaRenderPriority () const=0 |
Get the render priority for alpha objects (attached to 'alpha' name). | |
virtual void | ClearRenderPriorities ()=0 |
Clear all render priorities. | |
virtual iMaterial* | CreateBaseMaterial (iTextureWrapper *txt)=0 |
Create a base material that can be used to give to the texture manager. | |
virtual iMaterial* | CreateBaseMaterial (iTextureWrapper *txt, int num_layers, iTextureWrapper **wrappers, csTextureLayer *layers)=0 |
Create a base material that can be used to give to the texture manager. More... | |
virtual iTextureWrapper* | CreateTexture (const char *iName, const char *iFileName, csColor *iTransp, int iFlags)=0 |
Register a texture to be loaded during Prepare(). | |
virtual iMaterialWrapper* | CreateMaterial (const char *iName, iTextureWrapper *texture)=0 |
Register a material to be loaded during Prepare(). | |
virtual iSector* | CreateSector (const char *iName, bool link=true)=0 |
Create a empty sector with given name. More... | |
virtual iMeshWrapper* | CreateSectorWallsMesh (iSector *sector, const char *name)=0 |
Conveniance function to create the thing containing the convex outline of a sector. More... | |
virtual iSectorList* | GetSectors ()=0 |
Get the list of sectors. | |
virtual iMeshFactoryList* | GetMeshFactories ()=0 |
Get the list of mesh factories. | |
virtual iMeshList* | GetMeshes ()=0 |
Get the list of meshes. | |
virtual iCollectionList* | GetCollections ()=0 |
Get the list of collections. | |
virtual iCameraPositionList* | GetCameraPositions ()=0 |
Get the list of camera positions. | |
virtual iTextureList* | GetTextureList () const=0 |
Get the list of all textures. | |
virtual iMaterialList* | GetMaterialList () const=0 |
Get the list of all materials. | |
virtual void | SetLightingCacheMode (int mode)=0 |
Set the mode for the lighting cache (combination of CS_ENGINE_CACHE_???). More... | |
virtual int | GetLightingCacheMode ()=0 |
Get the mode for the lighting cache. | |
virtual int | GetLightmapCellSize () const=0 |
Return the current lightmap cell size. | |
virtual void | SetLightmapCellSize (int Size)=0 |
Set lightmap cell size. | |
virtual iCamera* | CreateCamera ()=0 |
Create a new camera. | |
virtual iStatLight* | CreateLight (const char *name, const csVector3 &pos, float radius, const csColor &color, bool pseudoDyn)=0 |
Create a static/pseudo-dynamic light. name can be NULL. | |
virtual iDynLight* | CreateDynLight (const csVector3 &pos, float radius, const csColor &color)=0 |
Create a dynamic light. | |
virtual void | RemoveDynLight (iDynLight *)=0 |
Remove a dynamic light. | |
virtual int | GetBeginDrawFlags () const=0 |
Get the required flags for 3D->BeginDraw() which should be called from the application. More... | |
virtual void | SetEngineMode (int mode)=0 |
Set the desired engine mode. More... | |
virtual int | GetEngineMode () const=0 |
Get the current engine mode. More... | |
virtual iClipper2D* | GetTopLevelClipper () const=0 |
Get the top-level clipper. | |
virtual iMeshFactoryWrapper* | CreateMeshFactory (const char *classId, const char *name)=0 |
Conveniance function to create a mesh factory from a given type. More... | |
virtual iMeshFactoryWrapper* | CreateMeshFactory (iMeshObjectFactory *, const char *name)=0 |
Create a mesh factory wrapper for an existing mesh factory. | |
virtual iMeshFactoryWrapper* | CreateMeshFactory (const char *name)=0 |
Create an uninitialized mesh factory wrapper. | |
virtual iMeshFactoryWrapper* | LoadMeshFactory (const char *classId, const char *name, const char *loaderClassId, iDataBuffer *input)=0 |
Conveniance function to load a mesh factory from a given loader plugin. | |
virtual iMeshWrapper* | CreateMeshWrapper (iMeshFactoryWrapper *factory, const char *name, iSector *sector=NULL, const csVector3 &pos=csVector3(0, 0, 0))=0 |
Conveniance function to create a mesh object for a given factory. More... | |
virtual iMeshWrapper* | CreateMeshWrapper (iMeshObject *, const char *name, iSector *sector=NULL, const csVector3 &pos=csVector3(0, 0, 0))=0 |
Create a mesh wrapper for an existing mesh object. | |
virtual iMeshWrapper* | CreateMeshWrapper (const char *name)=0 |
Create an uninitialized mesh wrapper. | |
virtual iMeshWrapper* | LoadMeshWrapper (const char *classId, const char *name, const char *loaderClassId, iDataBuffer *input, iSector *sector, const csVector3 &pos)=0 |
Conveniance function to load a mesh object from a given loader plugin. More... | |
virtual iMeshObjectType* | GetThingType () const=0 |
@ Temporary function until things are moved to a plugin. More... | |
virtual void | Draw (iCamera *c, iClipper2D *clipper)=0 |
Draw the 3D world given a camera and a clipper. More... | |
virtual void | DrawFunc (iCamera *c, iClipper2D *clipper, iDrawFuncCallback *callback)=0 |
This function is similar to Draw. More... | |
virtual void | SetContext (iGraphics3D *)=0 |
Set the drawing context. | |
virtual iGraphics3D* | GetContext () const=0 |
Return the current drawing context. | |
virtual void | SetAmbientLight (const csColor &)=0 |
Set the amount of ambient light. More... | |
virtual void | GetAmbientLight (csColor &) const=0 |
Return the amount of ambient light. |
The engine is responsible for creating new engine-specific objects such as sectors, things, sprites and so on.
|
Create a base material that can be used to give to the texture manager. This version also supports texture layers. Reimplemented in csEngine. |
|
Conveniance function to create a mesh factory from a given type. The type plugin will only be loaded if needed. 'classId' is the SCF name of the plugin (like 'crystalspace.mesh.object.cube'). Returns NULL on failure. The factory will be registered with the engine under the given name. If there is already a factory with that name no new factory will be created but the found one is returned instead. If the name is NULL then no name will be set and no check will happen if the factory already exists. Reimplemented in csEngine. |
|
Conveniance function to create a mesh object for a given factory. If 'sector' is NULL then the mesh object will not be set to a position. Returns NULL on failure. The object will be given the specified name. 'name' can be NULL if no name is wanted. Different mesh objects can have the same name (in contrast with factory objects). Reimplemented in csEngine. |
|
Create a empty sector with given name. If link == true (default) the sector will be linked to the engine. Reimplemented in csEngine. |
|
Conveniance function to create the thing containing the convex outline of a sector. The thing will be empty but it will have CS_ZBUF_FILL set and have 'wall' as render priority. This version creates a mesh wrapper. Reimplemented in csEngine. |
|
Draw the 3D world given a camera and a clipper. Note that in order to be able to draw using the given 3D driver all textures must have been registered to that driver (using Prepare()). Note that you need to call Prepare() again if you switch to another 3D driver. Reimplemented in csEngine. |
|
This function is similar to Draw. It will do all the stuff that Draw would do except for one important thing: it will not draw anything. Instead it will call a callback function for every entity that it was planning to draw. This allows you to show or draw debugging information (2D egdes for example). Reimplemented in csEngine. |
|
Get the required flags for 3D->BeginDraw() which should be called from the application. These flags must be or-ed with optional other flags that the application might be interested in. Reimplemented in csEngine. |
|
Get the current engine mode. If called between SetEngineMode() and the first Draw() it is possible that this mode will still be CS_ENGINE_AUTODETECT. Reimplemented in csEngine. |
|
@ Temporary function until things are moved to a plugin. @ Reimplemented in csEngine. |
|
Conveniance function to load a mesh object from a given loader plugin. If sector == NULL the object will not be placed in a sector. Reimplemented in csEngine. |
|
Prepare the engine. This function must be called after you loaded/created the world. It will prepare all lightmaps for use and also free all images that were loaded for the texture manager (the texture manager should have them locally now). The optional progress meter will be used to report progress. Reimplemented in csEngine. |
|
Create or select a new region (region can be NULL for the default main region). All new objects will be marked as belonging to this region. Reimplemented in csEngine. |
|
Create or select a new region (name can be NULL for the default main region). All new objects will be marked as belonging to this region. Reimplemented in csEngine. |
|
Set the amount of ambient light. This has no effect until you recalculate the lightmaps. Reimplemented in csEngine. |
|
Set the desired engine mode. One of the CS_ENGINE_... flags. Default is CS_ENGINE_AUTODETECT. If you select CS_ENGINE_AUTODETECT then the mode will be auto-detected (depending on level and/or hardware capabilities) the first time csEngine::Draw() is called. Reimplemented in csEngine. |
|
Set the mode for the lighting cache (combination of CS_ENGINE_CACHE_???). Default is CS_ENGINE_CACHE_READ. Reimplemented in csEngine. |
|
Calculate all lighting information. Normally you shouldn't call this function directly, because it will be called by Prepare(). If the optional 'region' parameter is given then only lights will be recalculated for the given region. Reimplemented in csEngine. |