Public Methods |
| CS_DECLARE_GROWING_ARRAY (render_priority_sortflags, int) |
| Sorting flags for the render priorities.
|
| 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.
|
void | Warn (const char *description,...) |
| Report a warning.
|
void | ReportBug (const char *description,...) |
| Report a bug.
|
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.
|
csObject* | QueryCsObject () |
| Query the csObject for the engine.
|
virtual bool | Prepare (iProgressMeter *meter=NULL) |
| Prepare the engine. More...
|
csRadiosity* | GetRadiosity () const |
| Get the pointer to the radiosity object (used with step-by-step debugging).
|
void | InvalidateLightmaps () |
| Invalidate all lightmaps. More...
|
virtual void | SetEngineMode (int mode) |
| Set the desired engine mode. More...
|
virtual int | GetEngineMode () const |
| Get the current engine mode. More...
|
virtual void | SetClearZBuf (bool yesno) |
| Require that the Z-buffer is cleared every frame. More...
|
virtual bool | GetClearZBuf () const |
| Get the value of the clear Z-buffer flag set with SetClearZBuf().
|
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.
|
void | InitCuller () |
| Initialize the culler.
|
csCBuffer* | GetCBuffer () const |
| Return c-buffer (or NULL if not used).
|
csCBufferCube* | GetCBufCube () const |
| Return cbuffer cube.
|
void | EnablePVS () |
| Enable PVS.
|
void | DisablePVS () |
| Disable PVS.
|
virtual bool | IsPVS () const |
| Is PVS enabled?
|
void | EnablePVSOnly () |
| Use only PVS for culling. More...
|
void | DisablePVSOnly () |
| Don't use only PVS for culling.
|
bool | IsPVSOnly () |
| Is PVS only enabled?
|
void | FreezePVS (const csVector3 &pos) |
| Freeze the PVS for some position.
|
void | UnfreezePVS () |
| Unfreeze the PVS.
|
bool | IsPVSFrozen () |
| Is the PVS frozen?
|
const csVector3& | GetFrozenPosition () const |
| Return the frozen position for the PVS.
|
virtual void | SetLightingCacheMode (int mode) |
| Set the mode for the lighting cache (combination of CS_ENGINE_CACHE_???). More...
|
virtual int | GetLightingCacheMode () |
| Get the mode for the lighting cache.
|
virtual int | GetLightmapCellSize () const |
| Return current lightmap cell size.
|
virtual void | SetLightmapCellSize (int Size) |
| Set lightmap cell size.
|
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.
|
csMaterialList* | GetMaterials () const |
| Return the object managing all loaded materials.
|
virtual iMaterial* | CreateBaseMaterial (iTextureWrapper *txt) |
| Create a base material.
|
virtual 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 iMaterialList* | GetMaterialList () const |
| Get the list of all materials.
|
virtual iTextureList* | GetTextureList () const |
| Get the list of all textures.
|
virtual iRegionList* | GetRegions () |
| Get the list of all regions.
|
iMeshWrapper* | CreateSectorWallsMesh (csSector *sector, const char *name) |
| Conveniance function to create the thing containing the convex outline of a sector. More...
|
virtual iMeshWrapper* | CreateSectorWallsMesh (iSector *sector, const char *name) |
| Conveniance function to create the thing containing the convex outline of a sector. More...
|
void | AddDynLight (csDynLight *dyn) |
| Add a dynamic light to the engine.
|
void | RemoveDynLight (csDynLight *dyn) |
| Remove a dynamic light from the engine.
|
csDynLight* | GetFirstDynLight () const |
| Return the first dynamic light in this engine.
|
virtual int | GetNearbyLights (iSector *sector, const csVector3 &pos, uint32 flags, iLight **lights, int max_num_lights) |
| This routine returns all lights which might affect an object at some position according to the following flags:
. More...
|
virtual iSectorIterator* | GetNearbySectors (iSector *sector, const csVector3 &pos, float radius) |
| This routine returns an iterator to iterate over all nearby sectors. More...
|
virtual iObjectIterator* | GetNearbyObjects (iSector *sector, const csVector3 &pos, float radius) |
| This routine returns an iterator to iterate over all objects of a given type that are within a radius of 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.
|
void | RemoveHalo (csLight *Light) |
| Remove halo attached to given light from the engine.
|
virtual void | Draw (iCamera *c, iClipper2D *clipper) |
| Draw the 3D world given a camera and a clipper. More...
|
virtual void | DrawFunc (iCamera *c, iClipper2D *clipper, iDrawFuncCallback *callback) |
| This function is similar to Draw. More...
|
csLightIt* | NewLightIterator (iRegion *region=NULL) |
| Create an iterator to iterate over all static lights of the engine.
|
void | AddToCurrentRegion (csObject *obj) |
| Add an object to the current region.
|
virtual void | RegisterRenderPriority (const char *name, long priority, int rendsort=CS_RENDPRI_NONE) |
| Register a new render priority.
|
virtual long | GetRenderPriority (const char *name) const |
| Get a render priority by name.
|
virtual int | GetRenderPrioritySorting (const char *name) const |
| Get the render priority sorting flag.
|
virtual int | GetRenderPrioritySorting (long priority) const |
| Get the render priority sorting flag.
|
virtual long | GetSkyRenderPriority () const |
| Get the render priority for sky objects (attached to 'sky' name).
|
virtual long | GetWallRenderPriority () const |
| Get the render priority for wall objects (attached to 'wall' name).
|
virtual long | GetObjectRenderPriority () const |
| Get the render priority for general objects (attached to 'object' name).
|
virtual long | GetAlphaRenderPriority () const |
| Get the render priority for alpha objects (attached to 'alpha' name).
|
virtual void | ClearRenderPriorities () |
| Clear all render priorities.
|
virtual iMeshObjectType* | GetThingType () const |
| @@ This function is deprecated! Please don't use it! Only the engine and thing mesh objects should use this now.
|
virtual bool | Initialize (iObjectRegistry *object_reg) |
| Initialize the engine. More...
|
virtual bool | HandleEvent (iEvent &Event) |
| We need to handle some events.
|
virtual csEngine* | GetCsEngine () |
| @@KLUDGE: This will no longer be needed once the iEngine interface is complete.
|
virtual int | GetTextureFormat () const |
| Query the format to load textures (usually this depends on texture manager).
|
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).
|
virtual void | DeleteAll () |
| Clear the entire engine.
|
virtual iTextureWrapper* | CreateTexture (const char *iName, const char *iFileName, csColor *iTransp, int iFlags) |
| Register a texture to be loaded during Prepare().
|
virtual iMaterialWrapper* | CreateMaterial (const char *iName, iTextureWrapper *texture) |
| Register a material to be loaded during Prepare().
|
virtual iSector* | CreateSector (const char *iName) |
| Create a empty sector with given name.
|
virtual iSectorList* | GetSectors () |
| Return the list of sectors.
|
virtual iMeshFactoryList* | GetMeshFactories () |
| Return the list of mesh factories.
|
virtual iMeshList* | GetMeshes () |
| Return the list of meshes.
|
virtual iCollectionList* | GetCollections () |
| Return the list of collections.
|
virtual iCameraPositionList* | GetCameraPositions () |
| Return the list of camera positions.
|
virtual iCamera* | CreateCamera () |
| Create a new camera.
|
virtual iStatLight* | CreateLight (const char *name, const csVector3 &pos, float radius, const csColor &color, bool pseudoDyn) |
| Create a static/pseudo-dynamic light.
|
virtual iStatLight* | FindLight (unsigned long light_id) const |
| Find a static/pseudo-dynamic light by ID.
|
virtual iStatLight* | FindLight (const char *Name, bool RegionOnly=false) const |
| Find a static/pseudo-dynamic light by name.
|
virtual iDynLight* | CreateDynLight (const csVector3 &pos, float radius, const csColor &color) |
| Create a dynamic light.
|
virtual void | RemoveDynLight (iDynLight *) |
| Remove a dynamic light.
|
virtual iMeshFactoryWrapper* | CreateMeshFactory (const char *classId, const char *name) |
| Create a mesh factory wrapper from a mesh plugin.
|
virtual iMeshFactoryWrapper* | CreateMeshFactory (iMeshObjectFactory *, const char *name) |
| Create a mesh factory wrapper for an existing mesh factory.
|
virtual iMeshFactoryWrapper* | CreateMeshFactory (const char *name) |
| Create an uninitialized mesh factory wrapper.
|
virtual iLoaderContext* | CreateLoaderContext (iRegion *region=NULL) |
| Create a loader context that you can give to loader plugins. More...
|
virtual iMeshFactoryWrapper* | LoadMeshFactory (const char *name, const char *loaderClassId, iDataBuffer *input) |
| Load mesh factory.
|
virtual 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.
|
virtual 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.
|
virtual iMeshWrapper* | CreateMeshWrapper (const char *name) |
| Create an uninitialized mesh wrapper.
|
virtual iMeshWrapper* | LoadMeshWrapper (const char *name, const char *loaderClassId, iDataBuffer *input, iSector *sector, const csVector3 &pos) |
| Load mesh object.
|
virtual iClipper2D* | GetTopLevelClipper () const |
| Get the top-level clipper.
|
virtual void | SetAmbientLight (const csColor &c) |
| Set the amount of ambient light.
|
virtual void | GetAmbientLight (csColor &c) const |
| Return the amount of ambient light.
|
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.
|
virtual void | SetContext (iGraphics3D *g3d) |
| Point engine to rendering context.
|
virtual iGraphics3D* | GetContext () const |
| Return the current drawing context.
|
Public Attributes |
iVFS* | VFS |
| This is the Virtual File System object where all the files used by the engine live. More...
|
iReporter* | Reporter |
| Pointer to an optional reporter that will be used for notification and warning messages.
|
csObjVector | 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.
|
csPoly2DPool* | render_pol2d_pool |
| An object pool for 2D polygons used by the rendering process.
|
csLightPatchPool* | lightpatch_pool |
| An object pool for lightpatches.
|
iGraphics3D* | G3D |
| The 3D driver.
|
iGraphics2D* | G2D |
| The 2D driver.
|
iImageIO* | ImageLoader |
| The graphics loader.
|
G3D_FOGMETHOD | fogmethod |
| The fog mode this G3D implements.
|
bool | NeedPO2Maps |
| Does the 3D driver require power-of-two lightmaps?
|
int | MaxAspectRatio |
| Maximum texture aspect ratio.
|
iRegion* | region |
| A pointer to the current region.
|
csRegionList | regions |
| The list of all regions currently loaded.
|
csVector | render_priorities |
| The list of all named render priorities.
|
long | render_priority_sky |
| The engine knows about the following render priorities and keeps them here:. More...
|
long | render_priority_wall |
long | render_priority_object |
long | render_priority_alpha |
iCamera* | current_camera |
| The current camera for drawing the world.
|
iClipper2D* | top_clipper |
| The top-level clipper we are currently using for drawing.
|
csThingObjectType* | thing_type |
| @ Temporary until things move to their own mesh plugin system. More...
|
| SCF_DECLARE_IBASE |
csEngine::eiComponent | scfiComponent |
csEngine::EventHandler * | scfiEventHandler |
csEngineConfig | scfiConfig |
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.
|
bool | ProcessPolygon () |
| Indicate that we will process another polygon. More...
|
bool | ProcessLastPolygon () |
| Return true if we are processing the last polygon.
|
Static Public Attributes |
int | frame_width |
| Remember dimensions of display.
|
int | frame_height |
| Remember dimensions of display.
|
iObjectRegistry* | object_reg |
| Remember iObjectRegistry.
|
csEngine* | current_engine |
| The shared engine instance.
|
iEngine* | current_iengine |
| The shared engine instance.
|
bool | use_new_radiosity |
| Need to render using newradiosity?
|
int | lightcache_mode |
| Option variable: force lightmap recalculation?
|
int | lightmap_quality |
| Option variable: quality for lightmap calculation.
|
bool | do_force_revis |
| Option variable: force visibility recalculation?
|
bool | do_rad_debug |
| Option variable: radiosity debugging (step by step)?
|
Friends |
class | csEngineState |
This class manages all components which comprise a 3D world including sectors, polygons, curves, mesh objects, etc.