CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csEngine Class Reference

The 3D engine. More...

#include <engine.h>

Inheritance diagram for csEngine:

iEngine iBase List of all members.

Public Methods

 csEngine (iBase *iParent)
 Initialize an empty engine. More...

virtual ~csEngine ()
 Delete the engine and all entities it contains. More...

void Report (const char *description,...)
 Report a notification message. More...

void Warn (const char *description,...)
 Report a warning. More...

void ReportBug (const char *description,...)
 Report a bug. More...

bool CheckConsistency ()
 Check consistency of the loaded elements which comprise the world. More...

virtual void PrepareTextures ()
 Prepare the textures. More...

virtual void PrepareMeshes ()
 Calls UpdateMove for all meshes to initialise bsp bounding boxes. More...

virtual void ShineLights (iRegion *region=NULL, iProgressMeter *meter=NULL)
 Calculate all lighting information. More...

virtual iObject * QueryObject ()
 Query the iObject for the engine. More...

csObject * QueryCsObject ()
 Query the csObject for the engine. More...

virtual bool Prepare (iProgressMeter *meter=NULL)
 Prepare the engine. More...

void InvalidateLightmaps ()
 Invalidate all lightmaps. More...

virtual int GetBeginDrawFlags () const
 Get the required flags for 3D->BeginDraw() which should be called from the application. More...

csTicks GetLastAnimationTime () const
 Get the last animation time. More...

virtual void SetLightingCacheMode (int mode)
 Set the mode for the lighting cache. More...

virtual int GetLightingCacheMode ()
 Get the mode for the lighting cache. More...

virtual void SetFastMeshThresshold (int th)
 Set the fastmesh thresshold. More...

virtual int GetFastMeshThresshold () const
 Get the fastmesh thresshold. More...

virtual void SetClearZBuf (bool yesno)
 Set clear z buffer flag. More...

virtual bool GetClearZBuf () const
 Get clear z buffer flag. More...

virtual bool GetDefaultClearZBuf () const
 Get default clear z-buffer flag. More...

virtual void SetClearScreen (bool yesno)
 Set clear screen flag. More...

virtual bool GetClearScreen () const
 Get clear screen flag. More...

virtual bool GetDefaultClearScreen () const
 Get default clear screen flag. More...

virtual void SetMaxLightmapSize (int w, int h)
 Set the maximum lightmap dimensions. More...

virtual void GetMaxLightmapSize (int &w, int &h)
 Retrieve maximum lightmap size. More...

virtual void GetDefaultMaxLightmapSize (int &w, int &h)
 Retrieve default maximum lightmap size. More...

virtual void GetDefaultAmbientLight (csColor &c) const
 Return the default amount of ambient light. More...

virtual bool GetLightmapsRequirePO2 () const
 Get a boolean which indicates if power of two lightmaps are required. More...

virtual int GetMaxLightmapAspectRatio () const
 Get the maximum aspect ratio for lightmaps. More...

virtual csPtr< iFrustumView > CreateFrustumView ()
 Create a iFrustumView instance that you can give to iVisibilityCuller->CastShadows(). More...

virtual csPtr< iObjectWatcher > CreateObjectWatcher ()
 Create an object watcher instance that you can use to watch other objects. More...

virtual void WantToDie (iMeshWrapper *mesh)
 Sometimes a mesh wants to destruct itself (for example a particle system that has only limited lifetime). More...

virtual void ResetWorldSpecificSettings ()
 Reset a subset of flags/settings (which may differ from one world/map to another) to its defaults. More...

void ReadConfig (iConfigFile *)
 Read configuration file (using the system driver) for all engine specific values. More...

void StartEngine ()
 Prepare for creation of a world. More...

csTextureList * GetTextures () const
 Return the object managing all loaded textures. More...

csMaterialList * GetMaterials () const
 Return the object managing all loaded materials. More...

csSharedVariableList * GetVariables () const
 Return the object managing all shared variables. More...

virtual csPtr< iMaterial > CreateBaseMaterial (iTextureWrapper *txt)
 Create a base material. More...

virtual csPtr< iMaterial > CreateBaseMaterial (iTextureWrapper *txt, int num_layers, iTextureWrapper **wrappers, csTextureLayer *layers)
 Create a base material that can be used to give to the texture manager. More...

virtual iSharedVariableList * GetVariableList () const
 Get the list of all shared variables. More...

virtual iMaterialList * GetMaterialList () const
 Get the list of all materials. More...

virtual iTextureList * GetTextureList () const
 Get the list of all textures. More...

virtual iRegionList * GetRegions ()
 Get the list of all regions. More...

virtual csPtr< iMeshWrapper > CreateSectorWallsMesh (iSector *sector, const char *name)
 Conveniance function to create the thing containing the convex outline of a sector. More...

virtual csPtr< iMeshWrapper > CreateThingMesh (iSector *sector, const char *name)
 Conveniance function to create a thing mesh in a sector. More...

void AddDynLight (csDynLight *dyn)
 Add a dynamic light to the engine. More...

void RemoveDynLight (csDynLight *dyn)
 Remove a dynamic light from the engine. More...

virtual iDynLight * GetFirstDynLight () const
 Return the first dynamic light in this engine. More...

virtual int GetNearbyLights (iSector *sector, const csVector3 &pos, uint32 flags, iLight **lights, int max_num_lights)
 Get all nearby lights. More...

virtual int GetNearbyLights (iSector *sector, const csBox3 &box, uint32 flags, iLight **lights, int max_num_lights)
 Get all nearby lights. More...

virtual csPtr< iSectorIterator > GetNearbySectors (iSector *sector, const csVector3 &pos, float radius)
 This routine returns an iterator to iterate over all nearby sectors. More...

virtual csPtr< iObjectIterator > GetNearbyObjects (iSector *sector, const csVector3 &pos, float radius, bool crossPortals=true)
 This routine returns an iterator to iterate over all objects that are within a radius of a given position. More...

virtual csPtr< iObjectIterator > GetVisibleObjects (iSector *sector, const csVector3 &pos)
 This routine returns an iterator to iterate over all objects that are potentially visible as seen from a given position. More...

virtual csPtr< iObjectIterator > GetVisibleObjects (iSector *sector, const csFrustum &frustum)
 This routine returns an iterator to iterate over all objects that are potentially visible as seen from a given position. More...

virtual bool RemoveObject (iBase *object)
 Conveniance function to 'remove' a CS object from the engine. More...

void AddHalo (csLight *Light)
 Add a halo attached to given light to the engine. More...

void RemoveHalo (csLight *Light)
 Remove halo attached to given light from the engine. More...

virtual void Draw (iCamera *c, iClipper2D *clipper)
 Draw the 3D world given a camera and a clipper. More...

virtual csPtr< iLightIterator > GetLightIterator (iRegion *region=NULL)
 Create an iterator to iterate over all static lights of the engine. More...

virtual void AddToCurrentRegion (iObject *obj)
 Add an object to the current region. More...

virtual void RegisterRenderPriority (const char *name, long priority, int rendsort=CS_RENDPRI_NONE, bool do_camera=false)
 Register a new render priority. More...

virtual long GetRenderPriority (const char *name) const
 Get a render priority by name. More...

virtual void SetRenderPriorityCamera (long priority, bool do_camera)
 Set the render priority camera flag. More...

virtual bool GetRenderPriorityCamera (const char *name) const
 Get the render priority camera flag. More...

virtual bool GetRenderPriorityCamera (long priority) const
 Get the render priority camera flag. More...

virtual int GetRenderPrioritySorting (const char *name) const
 Get the render priority sorting flag. More...

virtual int GetRenderPrioritySorting (long priority) const
 Get the render priority sorting flag. More...

virtual long GetSkyRenderPriority () const
 Get the render priority for sky objects (attached to 'sky' name). More...

virtual long GetWallRenderPriority () const
 Get the render priority for wall objects (attached to 'wall' name). More...

virtual long GetObjectRenderPriority () const
 Get the render priority for general objects (attached to 'object' name). More...

virtual long GetAlphaRenderPriority () const
 Get the render priority for alpha objects (attached to 'alpha' name). More...

virtual void ClearRenderPriorities ()
 Clear all render priorities. More...

virtual int GetRenderPriorityCount () const
 Get the number of render priorities. More...

virtual const char * GetRenderPriorityName (long priority) const
 Get the name of the render priority. More...

virtual bool Initialize (iObjectRegistry *object_reg)
 Initialize the engine. More...

virtual bool HandleEvent (iEvent &Event)
 We need to handle some events. More...

virtual int GetTextureFormat () const
 Query the format to load textures (usually this depends on texture manager). More...

virtual void SelectRegion (const char *iName)
 Create or select a new region (name can be NULL for the default main region). More...

virtual void SelectRegion (iRegion *region)
 Create or select a new region (region can be NULL for the default main region). More...

virtual iRegion * GetCurrentRegion () const
 Get a reference to the current region (or NULL if the default main region is selected). More...

virtual void DeleteAll ()
 Clear the entire engine. More...

virtual iTextureWrapper * CreateTexture (const char *iName, const char *iFileName, csColor *iTransp, int iFlags)
 Register a texture to be loaded during Prepare(). More...

virtual iTextureWrapper * CreateBlackTexture (const char *name, int w, int h, csColor *iTransp, int iFlags)
 Create a black texture. This is mostly useful for procedural textures. More...

virtual iMaterialWrapper * CreateMaterial (const char *iName, iTextureWrapper *texture)
 Register a material to be loaded during Prepare(). More...

virtual iSector * CreateSector (const char *iName)
 Create a empty sector with given name. More...

virtual iSectorList * GetSectors ()
 Return the list of sectors. More...

virtual iMeshFactoryList * GetMeshFactories ()
 Return the list of mesh factories. More...

virtual iMeshList * GetMeshes ()
 Return the list of meshes. More...

virtual iCollectionList * GetCollections ()
 Return the list of collections. More...

virtual iCameraPositionList * GetCameraPositions ()
 Return the list of camera positions. More...

virtual csPtr< iCamera > CreateCamera ()
 Create a new camera. More...

virtual csPtr< iStatLight > CreateLight (const char *name, const csVector3 &pos, float radius, const csColor &color, bool pseudoDyn)
 Create a static/pseudo-dynamic light. More...

virtual iStatLight * FindLightID (const char *light_id) const
 Find a static/pseudo-dynamic light by ID. More...

virtual iStatLight * FindLight (const char *Name, bool RegionOnly=false) const
 Find a static/pseudo-dynamic light by name. More...

virtual csPtr< iDynLight > CreateDynLight (const csVector3 &pos, float radius, const csColor &color)
 Create a dynamic light. More...

virtual void RemoveDynLight (iDynLight *)
 Remove a dynamic light. More...

virtual csPtr< iMeshFactoryWrapper > CreateMeshFactory (const char *classId, const char *name)
 Create a mesh factory wrapper from a mesh plugin. More...

virtual csPtr< iMeshFactoryWrapper > CreateMeshFactory (iMeshObjectFactory *, const char *name)
 Create a mesh factory wrapper for an existing mesh factory. More...

virtual csPtr< iMeshFactoryWrapper > CreateMeshFactory (const char *name)
 Create an uninitialized mesh factory wrapper. More...

virtual csPtr< iLoaderContext > CreateLoaderContext (iRegion *region=NULL)
 Create a loader context that you can give to loader plugins. More...

virtual csPtr< iMeshFactoryWrapper > LoadMeshFactory (const char *name, const char *loaderClassId, iDataBuffer *input)
 Load mesh factory. More...

virtual csPtr< iMeshWrapper > CreateMeshWrapper (iMeshFactoryWrapper *factory, const char *name, iSector *sector=NULL, const csVector3 &pos=csVector3(0, 0, 0))
 Create a mesh wrapper from a mesh factory wrapper. More...

virtual csPtr< iMeshWrapper > CreateMeshWrapper (iMeshObject *, const char *name, iSector *sector=NULL, const csVector3 &pos=csVector3(0, 0, 0))
 Create a mesh wrapper for an existing mesh object. More...

virtual csPtr< iMeshWrapper > CreateMeshWrapper (const char *classid, const char *name, iSector *sector=NULL, const csVector3 &pos=csVector3(0, 0, 0))
 Create a mesh wrapper from a class id. More...

virtual csPtr< iMeshWrapper > CreateMeshWrapper (const char *name)
 Create an uninitialized mesh wrapper. More...

virtual csPtr< iMeshWrapper > LoadMeshWrapper (const char *name, const char *loaderClassId, iDataBuffer *input, iSector *sector, const csVector3 &pos)
 Load mesh object. More...

virtual iClipper2D * GetTopLevelClipper () const
 Get the top-level clipper. More...

virtual void SetAmbientLight (const csColor &c)
 Set the amount of ambient light. More...

virtual void GetAmbientLight (csColor &c) const
 Return the amount of ambient light. More...

virtual iMaterialWrapper * FindMaterial (const char *name, iRegion *region=NULL)
 Find the given material. More...

virtual iTextureWrapper * FindTexture (const char *name, iRegion *region=NULL)
 Find the given texture. More...

virtual iSector * FindSector (const char *name, iRegion *region=NULL)
 Find the given sector. More...

virtual iMeshWrapper * FindMeshObject (const char *name, iRegion *region=NULL)
 Find the given mesh object. More...

virtual iMeshFactoryWrapper * FindMeshFactory (const char *name, iRegion *region=NULL)
 Find the given mesh factory. More...

virtual iCameraPosition * FindCameraPosition (const char *name, iRegion *region=NULL)
 Find the given camera position. More...

virtual iCollection * FindCollection (const char *name, iRegion *region=NULL)
 Find the given collection. More...

virtual void SetCacheManager (iCacheManager *cache_mgr)
 Set the cache manager that the engine will use. More...

virtual iCacheManager * GetCacheManager ()
 Get the cache manager that the engine is currently using. More...

virtual void SetContext (iTextureHandle *txt)
 Point engine to rendering context (for procedural textures). More...

virtual iTextureHandle * GetContext () const
 Return the current drawing context. More...


Static Public Methods

void SetMaxProcessPolygons (int m)
 Set the maximum number of polygons to process in one frame. More...

int GetMaxProcessPolygons ()
 Get the maximum number of polygons to process in one frame. More...

bool ProcessPolygon ()
 Indicate that we will process another polygon. More...

bool ProcessLastPolygon ()
 Return true if we are processing the last polygon. More...


Public Attributes

csRef< iVFS > VFS
 This is the Virtual File System object where all the files used by the engine live. More...

csRef< iEngineSequenceManager > eseqmgr
 Pointer to the engine sequence manager. More...

csRef< iReporter > Reporter
 Pointer to an optional reporter that will be used for notification and warning messages. More...

csRefArray< iBase > cleanup
 This is a vector which holds objects of type 'csCleanable'. More...

csSectorList sectors
 List of sectors in the engine. More...

csCollectionList collections
 List of all collections in the engine. More...

csMeshFactoryList mesh_factories
 List of mesh object factories. More...

csEngineMeshList meshes
 List of all meshes in the engine. More...

csCameraPositionList camera_positions
 The list of all camera position objects. More...

csRef< iGraphics3D > G3D
 The 3D driver. More...

csRef< iGraphics2D > G2D
 The 2D driver. More...

csRef< iImageIO > ImageLoader
 The graphics loader. More...

csRef< iCacheManager > cache_mgr
 The following variable is only set if the engine had to create its own cache manager. More...

G3D_FOGMETHOD fogmethod
 The fog mode this G3D implements. More...

bool NeedPO2Maps
 Does the 3D driver require power-of-two lightmaps? More...

int MaxAspectRatio
 Maximum texture aspect ratio. More...

iRegion * region
 A pointer to the current region. More...

csRegionList regions
 The list of all regions currently loaded. More...

csVector render_priorities
 The list of all named render priorities. More...

csGrowingArray< int > render_priority_sortflags
 Sorting flags for the render priorities. More...

csGrowingArray< bool > render_priority_cameraflags
 Do_camera flags for the render priorities. More...

long render_priority_sky
 The engine knows about the following render priorities and keeps them here:. More...

iCamera * current_camera
 The current camera for drawing the world. More...

iClipper2D * top_clipper
 The top-level clipper we are currently using for drawing. More...

csEngine::eiComponent scfiComponent
 iComponent implementation. More...

csEngine::EventHandler * scfiEventHandler
 iEventHandler implementation. More...


Static Public Attributes

int frame_width
 Remember dimensions of display. More...

int frame_height
 Remember dimensions of display. More...

iObjectRegistry * object_reg
 Remember iObjectRegistry. More...

csEngine * current_engine
 The shared engine instance. More...

iEngine * current_iengine
 The shared engine instance. More...

bool use_new_radiosity
 Need to render using newradiosity? More...

int lightcache_mode
 Option variable: force lightmap recalculation? More...

int lightmap_quality
 Option variable: quality for lightmap calculation. More...

bool do_force_revis
 Option variable: force visibility recalculation? More...

bool do_rad_debug
 Option variable: radiosity debugging (step by step)? More...

int max_lightmap_w
 Maximum lightmap dimensions. More...


Detailed Description

The 3D engine.

This class manages all components which comprise a 3D world including sectors, polygons, curves, mesh objects, etc.

Definition at line 209 of file csengine/engine.h.


Constructor & Destructor Documentation

csEngine::csEngine (  iBase *    iParent ) 
 

Initialize an empty engine.

The only thing that is valid just after creating the engine is the configurator object which you can use to configure the engine before continuing (see GetEngineConfig()).

virtual csEngine::~csEngine (    )  [virtual]
 

Delete the engine and all entities it contains.

All objects added to this engine by the user (like Things, Sectors, ...) will be deleted as well. If you don't want this then you should unlink them manually before destroying the engine.


Member Function Documentation

void csEngine::AddDynLight (  csDynLight *    dyn ) 
 

Add a dynamic light to the engine.

void csEngine::AddHalo (  csLight *    Light ) 
 

Add a halo attached to given light to the engine.

virtual void csEngine::AddToCurrentRegion (  iObject *    obj )  [virtual]
 

Add an object to the current region.

Implements iEngine.

bool csEngine::CheckConsistency (    ) 
 

Check consistency of the loaded elements which comprise the world.

Currently this function only checks if polygons have three or more vertices and if the vertices are coplanar (if more than three). This function prints out warnings for all found errors. Returns true if everything is in order.

virtual void csEngine::ClearRenderPriorities (    )  [virtual]
 

Clear all render priorities.

Implements iEngine.

virtual csPtr<iMaterial> csEngine::CreateBaseMaterial (  iTextureWrapper *    txt,
int    num_layers,
iTextureWrapper **    wrappers,
csTextureLayer *    layers
)  [virtual]
 

Create a base material that can be used to give to the texture manager.

This version also supports texture layers. Assign to a csRef or use DecRef().

Implements iEngine.

virtual csPtr<iMaterial> csEngine::CreateBaseMaterial (  iTextureWrapper *    txt )  [virtual]
 

Create a base material.

Implements iEngine.

virtual iTextureWrapper* csEngine::CreateBlackTexture (  const char *    name,
int    w,
int    h,
csColor *    iTransp,
int    iFlags
)  [virtual]
 

Create a black texture. This is mostly useful for procedural textures.

Implements iEngine.

virtual csPtr<iCamera> csEngine::CreateCamera (    )  [virtual]
 

Create a new camera.

Implements iEngine.

virtual csPtr<iDynLight> csEngine::CreateDynLight (  const csVector3 &    pos,
float    radius,
const csColor &    color
)  [virtual]
 

Create a dynamic light.

Implements iEngine.

virtual csPtr<iFrustumView> csEngine::CreateFrustumView (    )  [virtual]
 

Create a iFrustumView instance that you can give to iVisibilityCuller->CastShadows().

You can initialize that instance so that your own function is called for every object that is being visited.

Implements iEngine.

virtual csPtr<iStatLight> csEngine::CreateLight (  const char *    name,
const csVector3 &    pos,
float    radius,
const csColor &    color,
bool    pseudoDyn
)  [virtual]
 

Create a static/pseudo-dynamic light.

Implements iEngine.

virtual csPtr<iLoaderContext> csEngine::CreateLoaderContext (  iRegion *    region = NULL )  [virtual]
 

Create a loader context that you can give to loader plugins.

It will basically allow loader plugins to find materials, ... If region != NULL then only that region will be searched. Assign to a csRef or use DecRef().

Implements iEngine.

virtual iMaterialWrapper* csEngine::CreateMaterial (  const char *    iName,
iTextureWrapper *    texture
)  [virtual]
 

Register a material to be loaded during Prepare().

Implements iEngine.

virtual csPtr<iMeshFactoryWrapper> csEngine::CreateMeshFactory (  const char *    name )  [virtual]
 

Create an uninitialized mesh factory wrapper.

Implements iEngine.

virtual csPtr<iMeshFactoryWrapper> csEngine::CreateMeshFactory (  iMeshObjectFactory *   ,
const char *    name
)  [virtual]
 

Create a mesh factory wrapper for an existing mesh factory.

Implements iEngine.

virtual csPtr<iMeshFactoryWrapper> csEngine::CreateMeshFactory (  const char *    classId,
const char *    name
)  [virtual]
 

Create a mesh factory wrapper from a mesh plugin.

Implements iEngine.

virtual csPtr<iMeshWrapper> csEngine::CreateMeshWrapper (  const char *    name )  [virtual]
 

Create an uninitialized mesh wrapper.

Implements iEngine.

virtual csPtr<iMeshWrapper> csEngine::CreateMeshWrapper (  const char *    classid,
const char *    name,
iSector *    sector = NULL,
const csVector3 &    pos = csVector3(0, 0, 0)
)  [virtual]
 

Create a mesh wrapper from a class id.

Implements iEngine.

virtual csPtr<iMeshWrapper> csEngine::CreateMeshWrapper (  iMeshObject *   ,
const char *    name,
iSector *    sector = NULL,
const csVector3 &    pos = csVector3(0, 0, 0)
)  [virtual]
 

Create a mesh wrapper for an existing mesh object.

Implements iEngine.

virtual csPtr<iMeshWrapper> csEngine::CreateMeshWrapper (  iMeshFactoryWrapper *    factory,
const char *    name,
iSector *    sector = NULL,
const csVector3 &    pos = csVector3(0, 0, 0)
)  [virtual]
 

Create a mesh wrapper from a mesh factory wrapper.

Implements iEngine.

virtual csPtr<iObjectWatcher> csEngine::CreateObjectWatcher (    )  [virtual]
 

Create an object watcher instance that you can use to watch other objects.

The engine will not keep a reference to this object.

Implements iEngine.

virtual iSector* csEngine::CreateSector (  const char *    iName )  [virtual]
 

Create a empty sector with given name.

Implements iEngine.

virtual csPtr<iMeshWrapper> csEngine::CreateSectorWallsMesh (  iSector *    sector,
const char *    name
)  [virtual]
 

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 (so that the Z-buffer will be filled by the polygons of this object) and have 'wall' as render priority. This version creates a mesh wrapper. Assign to a csRef or use DecRef().

Implements iEngine.

virtual iTextureWrapper* csEngine::CreateTexture (  const char *    iName,
const char *    iFileName,
csColor *    iTransp,
int    iFlags
)  [virtual]
 

Register a texture to be loaded during Prepare().

Implements iEngine.

virtual csPtr<iMeshWrapper> csEngine::CreateThingMesh (  iSector *    sector,
const char *    name
)  [virtual]
 

Conveniance function to create a thing mesh in a sector.

This mesh will have CS_ZBUF_USE set (use Z-buffer fully) and have 'object' as render priority. This means this function is useful for general objects. Assign to a csRef or use DecRef().

Implements iEngine.

virtual void csEngine::DeleteAll (    )  [virtual]
 

Clear the entire engine.

Implements iEngine.

virtual void csEngine::Draw (  iCamera *    c,
iClipper2D *    clipper
)  [virtual]
 

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.

Implements iEngine.

virtual iCameraPosition* csEngine::FindCameraPosition (  const char *    name,
iRegion *    region = NULL
)  [virtual]
 

Find the given camera position.

The name can be a normal name. In that case this function will look in all regions except if region is not NULL in which case it will only look in that region. If the name is specified as 'regionname/objectname' then this function will only look in the specified region and return NULL if that region doesn't contain the object or the region doesn't exist. In this case the region parameter is ignored.

Implements iEngine.

virtual iCollection* csEngine::FindCollection (  const char *    name,
iRegion *    region = NULL
)  [virtual]
 

Find the given collection.

The name can be a normal name. In that case this function will look in all regions except if region is not NULL in which case it will only look in that region. If the name is specified as 'regionname/objectname' then this function will only look in the specified region and return NULL if that region doesn't contain the object or the region doesn't exist. In this case the region parameter is ignored.

Implements iEngine.

virtual iStatLight* csEngine::FindLight (  const char *    Name,
bool    RegionOnly = false
)  const [virtual]
 

Find a static/pseudo-dynamic light by name.

Implements iEngine.

virtual iStatLight* csEngine::FindLightID (  const char *    light_id )  const [virtual]
 

Find a static/pseudo-dynamic light by ID.

Implements iEngine.

virtual iMaterialWrapper* csEngine::FindMaterial (  const char *    name,
iRegion *    region = NULL
)  [virtual]
 

Find the given material.

The name can be a normal name. In that case this function will look in all regions except if region is not NULL in which case it will only look in that region. If the name is specified as 'regionname/objectname' then this function will only look in the specified region and return NULL if that region doesn't contain the object or the region doesn't exist. In this case the region parameter is ignored.

Implements iEngine.

virtual iMeshFactoryWrapper* csEngine::FindMeshFactory (  const char *    name,
iRegion *    region = NULL
)  [virtual]
 

Find the given mesh factory.

The name can be a normal name. In that case this function will look in all regions except if region is not NULL in which case it will only look in that region. If the name is specified as 'regionname/objectname' then this function will only look in the specified region and return NULL if that region doesn't contain the object or the region doesn't exist. In this case the region parameter is ignored.

Implements iEngine.

virtual iMeshWrapper* csEngine::FindMeshObject (  const char *    name,
iRegion *    region = NULL
)  [virtual]
 

Find the given mesh object.

The name can be a normal name. In that case this function will look in all regions except if region is not NULL in which case it will only look in that region. If the name is specified as 'regionname/objectname' then this function will only look in the specified region and return NULL if that region doesn't contain the object or the region doesn't exist. In this case the region parameter is ignored.

Implements iEngine.

virtual iSector* csEngine::FindSector (  const char *    name,
iRegion *    region = NULL
)  [virtual]
 

Find the given sector.

The name can be a normal name. In that case this function will look in all regions except if region is not NULL in which case it will only look in that region. If the name is specified as 'regionname/objectname' then this function will only look in the specified region and return NULL if that region doesn't contain the object or the region doesn't exist. In this case the region parameter is ignored.

Implements iEngine.

virtual iTextureWrapper* csEngine::FindTexture (  const char *    name,
iRegion *    region = NULL
)  [virtual]
 

Find the given texture.

The name can be a normal name. In that case this function will look in all regions except if region is not NULL in which case it will only look in that region. If the name is specified as 'regionname/objectname' then this function will only look in the specified region and return NULL if that region doesn't contain the object or the region doesn't exist. In this case the region parameter is ignored.

Implements iEngine.

virtual long csEngine::GetAlphaRenderPriority (    )  const [inline, virtual]
 

Get the render priority for alpha objects (attached to 'alpha' name).

Implements iEngine.

Definition at line 805 of file csengine/engine.h.

virtual void csEngine::GetAmbientLight (  csColor &    c )  const [virtual]
 

Return the amount of ambient light.

Implements iEngine.

virtual int csEngine::GetBeginDrawFlags (    )  const [inline, virtual]
 

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.

Implements iEngine.

Definition at line 585 of file csengine/engine.h.

virtual iCacheManager* csEngine::GetCacheManager (    )  [virtual]
 

Get the cache manager that the engine is currently using.

Implements iEngine.

virtual iCameraPositionList* csEngine::GetCameraPositions (    )  [inline, virtual]
 

Return the list of camera positions.

Implements iEngine.

Definition at line 906 of file csengine/engine.h.

References csCameraPositionList::scfiCameraPositionList.

virtual bool csEngine::GetClearScreen (    )  const [inline, virtual]
 

Get clear screen flag.

Implements iEngine.

Definition at line 629 of file csengine/engine.h.

virtual bool csEngine::GetClearZBuf (    )  const [inline, virtual]
 

Get clear z buffer flag.

Implements iEngine.

Definition at line 617 of file csengine/engine.h.

virtual iCollectionList* csEngine::GetCollections (    )  [inline, virtual]
 

Return the list of collections.

Implements iEngine.

Definition at line 903 of file csengine/engine.h.

References csCollectionList::scfiCollectionList.

virtual iTextureHandle* csEngine::GetContext (    )  const [virtual]
 

Return the current drawing context.

Implements iEngine.

virtual iRegion* csEngine::GetCurrentRegion (    )  const [virtual]
 

Get a reference to the current region (or NULL if the default main region is selected).

Implements iEngine.

virtual void csEngine::GetDefaultAmbientLight (  csColor &    c )  const [virtual]
 

Return the default amount of ambient light.

Implements iEngine.

virtual bool csEngine::GetDefaultClearScreen (    )  const [inline, virtual]
 

Get default clear screen flag.

Implements iEngine.

Definition at line 632 of file csengine/engine.h.

virtual bool csEngine::GetDefaultClearZBuf (    )  const [inline, virtual]
 

Get default clear z-buffer flag.

Implements iEngine.

Definition at line 620 of file csengine/engine.h.

virtual void csEngine::GetDefaultMaxLightmapSize (  int &    w,
int &    h
)  [inline, virtual]
 

Retrieve default maximum lightmap size.

Implements iEngine.

Definition at line 644 of file csengine/engine.h.

virtual int csEngine::GetFastMeshThresshold (    )  const [inline, virtual]
 

Get the fastmesh thresshold.

Implements iEngine.

Definition at line 608 of file csengine/engine.h.

virtual iDynLight* csEngine::GetFirstDynLight (    )  const [virtual]
 

Return the first dynamic light in this engine.

Implements iEngine.

csTicks csEngine::GetLastAnimationTime (    )  const [inline]
 

Get the last animation time.

Definition at line 598 of file csengine/engine.h.

References csTicks.

virtual int csEngine::GetLightingCacheMode (    )  [inline, virtual]
 

Get the mode for the lighting cache.

Implements iEngine.

Definition at line 603 of file csengine/engine.h.

References lightcache_mode.

virtual csPtr<iLightIterator> csEngine::GetLightIterator (  iRegion *    region = NULL )  [inline, virtual]
 

Create an iterator to iterate over all static lights of the engine.

Implements iEngine.

Definition at line 771 of file csengine/engine.h.

virtual bool csEngine::GetLightmapsRequirePO2 (    )  const [inline, virtual]
 

Get a boolean which indicates if power of two lightmaps are required.

Implements iEngine.

Definition at line 649 of file csengine/engine.h.

References NeedPO2Maps.

virtual iMaterialList* csEngine::GetMaterialList (    )  const [virtual]
 

Get the list of all materials.

Implements iEngine.

csMaterialList* csEngine::GetMaterials (    )  const [inline]
 

Return the object managing all loaded materials.

Definition at line 688 of file csengine/engine.h.

virtual int csEngine::GetMaxLightmapAspectRatio (    )  const [inline, virtual]
 

Get the maximum aspect ratio for lightmaps.

Implements iEngine.

Definition at line 650 of file csengine/engine.h.

References MaxAspectRatio.

virtual void csEngine::GetMaxLightmapSize (  int &    w,
int &    h
)  [inline, virtual]
 

Retrieve maximum lightmap size.

Implements iEngine.

Definition at line 641 of file csengine/engine.h.

References max_lightmap_w.

int csEngine::GetMaxProcessPolygons (    )  [inline, static]
 

Get the maximum number of polygons to process in one frame.

Definition at line 546 of file csengine/engine.h.

virtual iMeshList* csEngine::GetMeshes (    )  [inline, virtual]
 

Return the list of meshes.

Implements iEngine.

Definition at line 900 of file csengine/engine.h.

virtual iMeshFactoryList* csEngine::GetMeshFactories (    )  [inline, virtual]
 

Return the list of mesh factories.

Implements iEngine.

Definition at line 897 of file csengine/engine.h.

virtual int csEngine::GetNearbyLights (  iSector *    sector,
const csBox3 &    box,
uint32    flags,
iLight **    lights,
int    max_num_lights
)  [virtual]
 

Get all nearby lights.

Implements iEngine.

virtual int csEngine::GetNearbyLights (  iSector *    sector,
const csVector3 &    pos,
uint32    flags,
iLight **    lights,
int    max_num_lights
)  [virtual]
 

Get all nearby lights.

Implements iEngine.

virtual csPtr<iObjectIterator> csEngine::GetNearbyObjects (  iSector *    sector,
const csVector3 &    pos,
float    radius,
bool    crossPortals = true
)  [virtual]
 

This routine returns an iterator to iterate over all objects that are within a radius of a given position.

You can use SCF_QUERY_INTERFACE to get any interface from the returned objects. If crossPortals is true it will search through portals. Otherwise it will limit the search to the sector passed in.

Assign to a csRef or use DecRef().

Implements iEngine.

virtual csPtr<iSectorIterator> csEngine::GetNearbySectors (  iSector *    sector,
const csVector3 &    pos,
float    radius
)  [virtual]
 

This routine returns an iterator to iterate over all nearby sectors.

Implements iEngine.

virtual long csEngine::GetObjectRenderPriority (    )  const [inline, virtual]
 

Get the render priority for general objects (attached to 'object' name).

Implements iEngine.

Definition at line 803 of file csengine/engine.h.

virtual iRegionList* csEngine::GetRegions (    )  [virtual]
 

Get the list of all regions.

Implements iEngine.

virtual long csEngine::GetRenderPriority (  const char *    name )  const [virtual]
 

Get a render priority by name.

Implements iEngine.

virtual bool csEngine::GetRenderPriorityCamera (  long    priority )  const [virtual]
 

Get the render priority camera flag.

Implements iEngine.

virtual bool csEngine::GetRenderPriorityCamera (  const char *    name )  const [virtual]
 

Get the render priority camera flag.

Implements iEngine.

virtual int csEngine::GetRenderPriorityCount (    )  const [virtual]
 

Get the number of render priorities.

Implements iEngine.

virtual const char* csEngine::GetRenderPriorityName (  long    priority )  const [virtual]
 

Get the name of the render priority.

Implements iEngine.

virtual int csEngine::GetRenderPrioritySorting (  long    priority )  const [virtual]
 

Get the render priority sorting flag.

Implements iEngine.

virtual int csEngine::GetRenderPrioritySorting (  const char *    name )  const [virtual]
 

Get the render priority sorting flag.

Implements iEngine.

virtual iSectorList* csEngine::GetSectors (    )  [inline, virtual]
 

Return the list of sectors.

Implements iEngine.

Definition at line 894 of file csengine/engine.h.

virtual long csEngine::GetSkyRenderPriority (    )  const [inline, virtual]
 

Get the render priority for sky objects (attached to 'sky' name).

Implements iEngine.

Definition at line 799 of file csengine/engine.h.

References render_priority_sky.

virtual int csEngine::GetTextureFormat (    )  const [virtual]
 

Query the format to load textures (usually this depends on texture manager).

Implements iEngine.

virtual iTextureList* csEngine::GetTextureList (    )  const [virtual]
 

Get the list of all textures.

Implements iEngine.

csTextureList* csEngine::GetTextures (    )  const [inline]
 

Return the object managing all loaded textures.

Definition at line 683 of file csengine/engine.h.

virtual iClipper2D* csEngine::GetTopLevelClipper (    )  const [virtual]
 

Get the top-level clipper.

Implements iEngine.

virtual iSharedVariableList* csEngine::GetVariableList (    )  const [virtual]
 

Get the list of all shared variables.

Implements iEngine.

csSharedVariableList* csEngine::GetVariables (    )  const [inline]
 

Return the object managing all shared variables.

Definition at line 693 of file csengine/engine.h.

virtual csPtr<iObjectIterator> csEngine::GetVisibleObjects (  iSector *    sector,
const csFrustum &    frustum
)  [virtual]
 

This routine returns an iterator to iterate over all objects that are potentially visible as seen from a given position.

This routine has a frustum restricting the view. You can use SCF_QUERY_INTERFACE to get any interface from the returned objects.

Assign to a csRef or use DecRef().

Implements iEngine.

virtual csPtr<iObjectIterator> csEngine::GetVisibleObjects (  iSector *    sector,
const csVector3 &    pos
)  [virtual]
 

This routine returns an iterator to iterate over all objects that are potentially visible as seen from a given position.

This routine assumes full 360 degree visibility. You can use SCF_QUERY_INTERFACE to get any interface from the returned objects.

Assign to a csRef or use DecRef().

Implements iEngine.

virtual long csEngine::GetWallRenderPriority (    )  const [inline, virtual]
 

Get the render priority for wall objects (attached to 'wall' name).

Implements iEngine.

Definition at line 801 of file csengine/engine.h.

virtual bool csEngine::HandleEvent (  iEvent &    Event )  [virtual]
 

We need to handle some events.

Referenced by csEngine::EventHandler::HandleEvent.

virtual bool csEngine::Initialize (  iObjectRegistry *    object_reg )  [virtual]
 

Initialize the engine.

This is automatically called by system driver at startup so that plugin can do basic initialization stuff, register with the system driver and so on.

void csEngine::InvalidateLightmaps (    ) 
 

Invalidate all lightmaps.

This can be called after doing a significant change on the static lightmaps (i.e. after doing a radiosity debug function).

virtual csPtr<iMeshFactoryWrapper> csEngine::LoadMeshFactory (  const char *    name,
const char *    loaderClassId,
iDataBuffer *    input
)  [virtual]
 

Load mesh factory.

Implements iEngine.

virtual csPtr<iMeshWrapper> csEngine::LoadMeshWrapper (  const char *    name,
const char *    loaderClassId,
iDataBuffer *    input,
iSector *    sector,
const csVector3 &    pos
)  [virtual]
 

Load mesh object.

Implements iEngine.

virtual bool csEngine::Prepare (  iProgressMeter *    meter = NULL )  [virtual]
 

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.

Implements iEngine.

virtual void csEngine::PrepareMeshes (    )  [virtual]
 

Calls UpdateMove for all meshes to initialise bsp bounding boxes.

Call this after creating a BSP tree. csEngine::Prepare() will call this function automatically so you normally don't have to call it.

Implements iEngine.

virtual void csEngine::PrepareTextures (    )  [virtual]
 

Prepare the textures.

It will initialise all loaded textures for the texture manager. (Normally you shouldn't call this function directly, because it will be called by Prepare() for you. This function will also prepare all loaded materials after preparing the textures.

Implements iEngine.

bool csEngine::ProcessLastPolygon (    )  [inline, static]
 

Return true if we are processing the last polygon.

Definition at line 562 of file csengine/engine.h.

bool csEngine::ProcessPolygon (    )  [inline, static]
 

Indicate that we will process another polygon.

Returns false if we need to stop.

Definition at line 552 of file csengine/engine.h.

csObject* csEngine::QueryCsObject (    )  [inline]
 

Query the csObject for the engine.

Definition at line 525 of file csengine/engine.h.

virtual iObject* csEngine::QueryObject (    )  [virtual]
 

Query the iObject for the engine.

Implements iEngine.

void csEngine::ReadConfig (  iConfigFile *    ) 
 

Read configuration file (using the system driver) for all engine specific values.

This function is called by Initialize() so you normally do not need to call it yourselves.

virtual void csEngine::RegisterRenderPriority (  const char *    name,
long    priority,
int    rendsort = CS_RENDPRI_NONE,
bool    do_camera = false
)  [virtual]
 

Register a new render priority.

Implements iEngine.

virtual void csEngine::RemoveDynLight (  iDynLight *    )  [virtual]
 

Remove a dynamic light.

Implements iEngine.

void csEngine::RemoveDynLight (  csDynLight *    dyn ) 
 

Remove a dynamic light from the engine.

void csEngine::RemoveHalo (  csLight *    Light ) 
 

Remove halo attached to given light from the engine.

virtual bool csEngine::RemoveObject (  iBase *    object )  [virtual]
 

Conveniance function to 'remove' a CS object from the engine.

This will not clear the object but it will remove all references to that object that the engine itself keeps. This function works for: iSector, iCollection, iMeshWrapper, iMeshFactoryWrapper, iCameraPosition, iDynLight, iMaterialWrapper, and iTextureWrapper. Note that the object is only removed if the resulting ref count will become zero. So basically this function only releases the references that the engine holds.

This function returns true if the engine recognized the object as one on which it can operate.

This function will also remove the object from the region it may be in.

Implements iEngine.

void csEngine::Report (  const char *    description,
...   
) 
 

Report a notification message.

void csEngine::ReportBug (  const char *    description,
...   
) 
 

Report a bug.

virtual void csEngine::ResetWorldSpecificSettings (    )  [virtual]
 

Reset a subset of flags/settings (which may differ from one world/map to another) to its defaults.

This currently includes:

  • clear z buffer flag
  • lightmap cell size
  • maximum lighmap size
  • ambient color

Implements iEngine.

virtual void csEngine::SelectRegion (  iRegion *    region )  [virtual]
 

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.

Implements iEngine.

virtual void csEngine::SelectRegion (  const char *    iName )  [virtual]
 

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.

Implements iEngine.

virtual void csEngine::SetAmbientLight (  const csColor &    c )  [virtual]
 

Set the amount of ambient light.

Implements iEngine.

virtual void csEngine::SetCacheManager (  iCacheManager *    cache_mgr )  [virtual]
 

Set the cache manager that the engine will use.

If this is not done then the engine will use its own cache manager based on VFS. This will do an incref on the given cache manager and a decref on the old one. The engine will release the cache manager at destruction time.

Implements iEngine.

virtual void csEngine::SetClearScreen (  bool    yesno )  [inline, virtual]
 

Set clear screen flag.

Implements iEngine.

Definition at line 623 of file csengine/engine.h.

virtual void csEngine::SetClearZBuf (  bool    yesno )  [inline, virtual]
 

Set clear z buffer flag.

Implements iEngine.

Definition at line 611 of file csengine/engine.h.

virtual void csEngine::SetContext (  iTextureHandle *    txt )  [virtual]
 

Point engine to rendering context (for procedural textures).

Implements iEngine.

virtual void csEngine::SetFastMeshThresshold (  int    th )  [inline, virtual]
 

Set the fastmesh thresshold.

Implements iEngine.

Definition at line 606 of file csengine/engine.h.

virtual void csEngine::SetLightingCacheMode (  int    mode )  [inline, virtual]
 

Set the mode for the lighting cache.

Implements iEngine.

Definition at line 601 of file csengine/engine.h.

References lightcache_mode.

virtual void csEngine::SetMaxLightmapSize (  int    w,
int    h
)  [inline, virtual]
 

Set the maximum lightmap dimensions.

Polys with lightmaps larger than this are not lit.

Implements iEngine.

Definition at line 638 of file csengine/engine.h.

References max_lightmap_w.

void csEngine::SetMaxProcessPolygons (  int    m )  [inline, static]
 

Set the maximum number of polygons to process in one frame.

This is mainly useful for debugging.

Definition at line 541 of file csengine/engine.h.

virtual void csEngine::SetRenderPriorityCamera (  long    priority,
bool    do_camera
)  [virtual]
 

Set the render priority camera flag.

Implements iEngine.

virtual void csEngine::ShineLights (  iRegion *    region = NULL,
iProgressMeter *    meter = NULL
)  [virtual]
 

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.

Implements iEngine.

void csEngine::StartEngine (    ) 
 

Prepare for creation of a world.

This function is called by Initialize() so you normally do not need to call it yourselves.

virtual void csEngine::WantToDie (  iMeshWrapper *    mesh )  [virtual]
 

Sometimes a mesh wants to destruct itself (for example a particle system that has only limited lifetime).

It can do that by calling this function on itself. The engine will then remove the object before the next frame.

Implements iEngine.

void csEngine::Warn (  const char *    description,
...   
) 
 

Report a warning.


Member Data Documentation

csRef<iCacheManager> csEngine::cache_mgr
 

The following variable is only set if the engine had to create its own cache manager.

In that case the engine is also responsible for cleaning this up.

Definition at line 300 of file csengine/engine.h.

csCameraPositionList csEngine::camera_positions
 

The list of all camera position objects.

Definition at line 277 of file csengine/engine.h.

csRefArray<iBase> csEngine::cleanup
 

This is a vector which holds objects of type 'csCleanable'.

They will be destroyed when the engine is destroyed. That's the only special thing. This is useful for holding memory which you allocate locally in a function but you want to reuse accross function invocations. There is no general way to make sure that the memory will be freed it only exists as a static pointer in your function code. Adding a class encapsulating that memory to this array will ensure that the memory is removed once the engine is destroyed.

Definition at line 244 of file csengine/engine.h.

csCollectionList csEngine::collections
 

List of all collections in the engine.

This vector contains objects of type iCollection*.

Definition at line 257 of file csengine/engine.h.

iCamera* csEngine::current_camera
 

The current camera for drawing the world.

Definition at line 450 of file csengine/engine.h.

csEngine* csEngine::current_engine [static]
 

The shared engine instance.

Definition at line 284 of file csengine/engine.h.

iEngine* csEngine::current_iengine [static]
 

The shared engine instance.

Definition at line 286 of file csengine/engine.h.

bool csEngine::do_force_revis [static]
 

Option variable: force visibility recalculation?

Definition at line 340 of file csengine/engine.h.

bool csEngine::do_rad_debug [static]
 

Option variable: radiosity debugging (step by step)?

Definition at line 342 of file csengine/engine.h.

csRef<iEngineSequenceManager> csEngine::eseqmgr
 

Pointer to the engine sequence manager.

Definition at line 225 of file csengine/engine.h.

G3D_FOGMETHOD csEngine::fogmethod
 

The fog mode this G3D implements.

Definition at line 303 of file csengine/engine.h.

int csEngine::frame_height [static]
 

Remember dimensions of display.

Definition at line 280 of file csengine/engine.h.

int csEngine::frame_width [static]
 

Remember dimensions of display.

Definition at line 280 of file csengine/engine.h.

csRef<iGraphics2D> csEngine::G2D
 

The 2D driver.

Definition at line 292 of file csengine/engine.h.

csRef<iGraphics3D> csEngine::G3D
 

The 3D driver.

Definition at line 290 of file csengine/engine.h.

csRef<iImageIO> csEngine::ImageLoader
 

The graphics loader.

Definition at line 294 of file csengine/engine.h.

int csEngine::lightcache_mode [static]
 

Option variable: force lightmap recalculation?

Definition at line 336 of file csengine/engine.h.

Referenced by GetLightingCacheMode, and SetLightingCacheMode.

int csEngine::lightmap_quality [static]
 

Option variable: quality for lightmap calculation.

Definition at line 338 of file csengine/engine.h.

int csEngine::max_lightmap_w [static]
 

Maximum lightmap dimensions.

Definition at line 344 of file csengine/engine.h.

Referenced by GetMaxLightmapSize, and SetMaxLightmapSize.

int csEngine::MaxAspectRatio
 

Maximum texture aspect ratio.

Definition at line 308 of file csengine/engine.h.

Referenced by GetMaxLightmapAspectRatio.

csMeshFactoryList csEngine::mesh_factories
 

List of mesh object factories.

This vector contains objects of type csMeshFactoryWrapper*.

Definition at line 263 of file csengine/engine.h.

csEngineMeshList csEngine::meshes
 

List of all meshes in the engine.

This vector contains objects of type csMeshWrapper*. Use RemoveMesh() to remove meshes from this list. This function will take care of correctly removing the meshes from all sectors as well. Note that after you add a mesh to the list you still need to add it to all sectors that you want it to be visible in.

Definition at line 272 of file csengine/engine.h.

bool csEngine::NeedPO2Maps
 

Does the 3D driver require power-of-two lightmaps?

Definition at line 306 of file csengine/engine.h.

Referenced by GetLightmapsRequirePO2.

iObjectRegistry* csEngine::object_reg [static]
 

Remember iObjectRegistry.

Definition at line 282 of file csengine/engine.h.

iRegion* csEngine::region
 

A pointer to the current region.

Definition at line 310 of file csengine/engine.h.

csRegionList csEngine::regions
 

The list of all regions currently loaded.

Definition at line 312 of file csengine/engine.h.

csVector csEngine::render_priorities
 

The list of all named render priorities.

Definition at line 315 of file csengine/engine.h.

csGrowingArray<bool> csEngine::render_priority_cameraflags
 

Do_camera flags for the render priorities.

Definition at line 319 of file csengine/engine.h.

long csEngine::render_priority_sky
 

The engine knows about the following render priorities and keeps them here:.

  • "sky": usually rendered using ZFILL or ZNONE
  • "wall": usually rendered using ZFILL
  • "object": usually rendered using ZUSE
  • "alpha": usually rendered using ZTEST

Definition at line 330 of file csengine/engine.h.

Referenced by GetSkyRenderPriority.

csGrowingArray<int> csEngine::render_priority_sortflags
 

Sorting flags for the render priorities.

Definition at line 317 of file csengine/engine.h.

csRef<iReporter> csEngine::Reporter
 

Pointer to an optional reporter that will be used for notification and warning messages.

Definition at line 231 of file csengine/engine.h.

csEngine::eiComponent csEngine::scfiComponent
 

iComponent implementation.

csEngine::EventHandler * csEngine::scfiEventHandler
 

iEventHandler implementation.

csSectorList csEngine::sectors
 

List of sectors in the engine.

This vector contains objects of type iSector*. Use CreateSector() to add sectors to the engine.

Definition at line 251 of file csengine/engine.h.

iClipper2D* csEngine::top_clipper
 

The top-level clipper we are currently using for drawing.

Definition at line 455 of file csengine/engine.h.

bool csEngine::use_new_radiosity [static]
 

Need to render using newradiosity?

Definition at line 288 of file csengine/engine.h.

csRef<iVFS> csEngine::VFS
 

This is the Virtual File System object where all the files used by the engine live.

Textures, models, data, everything - reside on this virtual disk volume. You should avoid using the standard file functions (such as fopen(), fread() and so on) since they are highly system-dependent (for example, DOS uses '\' as path separator, Mac uses ':' and Unix uses '/').

Definition at line 220 of file csengine/engine.h.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14