iEngine Struct Reference
[Crystal Space 3D Engine]
This interface is the main interface to the 3D engine.
More...
#include <engine.h>
Inheritance diagram for iEngine:

Public Methods | |
virtual iObject * | QueryObject ()=0 |
Get the iObject for the engine. | |
virtual bool | Prepare (iProgressMeter *meter=0)=0 |
Prepare the engine. | |
virtual void | ForceRelight (iRegion *region=0, iProgressMeter *meter=0)=0 |
Force a relight of all lighting. | |
virtual void | ForceRelight (iLight *light, iRegion *region=0)=0 |
Force a relight for the given light. | |
virtual void | RemoveLight (iLight *light)=0 |
Remove a light and update all lightmaps. | |
virtual void | PrepareTextures ()=0 |
Prepare the textures. | |
virtual void | PrepareMeshes ()=0 |
Calls UpdateMove for all meshes to initialise bsp bounding boxes. | |
virtual void | ShineLights (iRegion *region=0, iProgressMeter *meter=0)=0 |
Calculate all lighting information. | |
virtual int | GetTextureFormat () const=0 |
Query the format to load textures (usually this depends on texture manager). | |
virtual void | DeleteAll ()=0 |
Delete everything in the engine. | |
virtual void | RegisterRenderPriority (const char *name, long priority, int rendsort=CS_RENDPRI_NONE)=0 |
Register a new render priority. | |
virtual long | GetRenderPriority (const char *name) const=0 |
Get a render priority by name. | |
virtual int | GetRenderPrioritySorting (const char *name) const=0 |
Get the render priority sorting flag. | |
virtual int | GetRenderPrioritySorting (long priority) const=0 |
Get the render priority sorting flag. | |
virtual long | GetSkyRenderPriority ()=0 |
Get the render priority for sky objects (attached to 'sky' name). | |
virtual long | GetPortalRenderPriority ()=0 |
Get the render priority for portal objects (attached to 'portal' name). | |
virtual long | GetWallRenderPriority ()=0 |
Get the render priority for wall objects (attached to 'wall' name). | |
virtual long | GetObjectRenderPriority ()=0 |
Get the render priority for general objects (attached to 'object' name). | |
virtual long | GetAlphaRenderPriority ()=0 |
Get the render priority for alpha objects (attached to 'alpha' name). | |
virtual void | ClearRenderPriorities ()=0 |
Clear all render priorities. | |
virtual int | GetRenderPriorityCount () const=0 |
Get the number of render priorities. | |
virtual const char * | GetRenderPriorityName (long priority) const=0 |
Get the name of the render priority or 0 if none existant. | |
virtual csPtr< iMaterial > | CreateBaseMaterial (iTextureWrapper *txt)=0 |
Create a base material that can be used to give to the texture manager. | |
virtual csPtr< 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. | |
virtual iTextureWrapper * | CreateTexture (const char *name, const char *fileName, csColor *transp, int flags)=0 |
Create a texture from a file. | |
virtual iTextureWrapper * | CreateBlackTexture (const char *name, int w, int h, csColor *iTransp, int iFlags)=0 |
Create a black texture. | |
virtual iMaterialWrapper * | CreateMaterial (const char *name, iTextureWrapper *texture)=0 |
Register a material to be loaded during Prepare(). | |
virtual iSector * | CreateSector (const char *name)=0 |
Create a empty sector with given name. | |
virtual csPtr< iMeshWrapper > | CreateSectorWallsMesh (iSector *sector, const char *name)=0 |
Convenience function to create the thing containing the convex outline of a sector. | |
virtual csPtr< iMeshWrapper > | CreateThingMesh (iSector *sector, const char *name)=0 |
Convenience function to create a thing mesh in a sector. | |
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 iSharedVariableList * | GetVariableList () const=0 |
Get the list of all shared variables. | |
virtual iRegion * | CreateRegion (const char *name)=0 |
Create a new region and add it to the region list. | |
virtual iRegionList * | GetRegions ()=0 |
Get the list of all regions. | |
virtual iMaterialWrapper * | FindMaterial (const char *name, iRegion *region=0)=0 |
Find the given material. | |
virtual iTextureWrapper * | FindTexture (const char *name, iRegion *region=0)=0 |
Find the given texture. | |
virtual iSector * | FindSector (const char *name, iRegion *region=0)=0 |
Find the given sector. | |
virtual iMeshWrapper * | FindMeshObject (const char *name, iRegion *region=0)=0 |
Find the given mesh object. | |
virtual iMeshFactoryWrapper * | FindMeshFactory (const char *name, iRegion *region=0)=0 |
Find the given mesh factory. | |
virtual iCameraPosition * | FindCameraPosition (const char *name, iRegion *region=0)=0 |
Find the given camera position. | |
virtual iCollection * | FindCollection (const char *name, iRegion *region=0)=0 |
Find the given collection. | |
virtual void | SetLightingCacheMode (int mode)=0 |
Set the mode for the lighting cache (combination of CS_ENGINE_CACHE_???). | |
virtual int | GetLightingCacheMode ()=0 |
Get the mode for the lighting cache. | |
virtual void | SetClearZBuf (bool yesno)=0 |
Require that the Z-buffer is cleared every frame. | |
virtual bool | GetClearZBuf () const=0 |
Get the value of the clear Z-buffer flag set with SetClearZBuf(). | |
virtual bool | GetDefaultClearZBuf () const=0 |
Get default clear z-buffer flag. | |
virtual void | SetClearScreen (bool yesno)=0 |
Require that the screen is cleared every frame. | |
virtual bool | GetClearScreen () const=0 |
Get the value of the clear screen flag set with SetClearScreen(). | |
virtual bool | GetDefaultClearScreen () const=0 |
Get default clear screen flag. | |
virtual void | SetMaxLightmapSize (int w, int h)=0 |
Set the maximum lightmap dimensions. | |
virtual void | GetMaxLightmapSize (int &w, int &h)=0 |
Retrieve maximum lightmap size. | |
virtual void | GetDefaultMaxLightmapSize (int &w, int &h)=0 |
Retrieve default maximum lightmap size. | |
virtual int | GetMaxLightmapAspectRatio () const=0 |
Get the maximum aspect ratio for lightmaps. | |
virtual void | ResetWorldSpecificSettings ()=0 |
Reset a subset of flags/settings (which may differ from one world/map to another) to its defaults. | |
virtual csPtr< iCamera > | CreateCamera ()=0 |
Create a new camera. | |
virtual csPtr< iLight > | CreateLight (const char *name, const csVector3 &pos, float radius, const csColor &color, int dyntype=CS_LIGHT_DYNAMICTYPE_STATIC)=0 |
Create a static/pseudo-dynamic light. | |
virtual iLight * | FindLight (const char *Name, bool RegionOnly=false) const=0 |
Find a static/pseudo-dynamic light by name. | |
virtual iLight * | FindLightID (const char *light_id) const=0 |
Find a static/pseudo-dynamic light by id. | |
virtual csPtr< iLightIterator > | GetLightIterator (iRegion *region=0)=0 |
Create an iterator to iterate over all static lights of the engine. | |
virtual int | GetBeginDrawFlags () const=0 |
Get the required flags for 3D->BeginDraw() which should be called from the application. | |
virtual iRenderView * | GetTopLevelClipper () const=0 |
Get the top-level clipper. | |
virtual csPtr< iMeshFactoryWrapper > | CreateMeshFactory (const char *classId, const char *name)=0 |
Convenience function to create a mesh factory from a given type. | |
virtual csPtr< iMeshFactoryWrapper > | CreateMeshFactory (iMeshObjectFactory *factory, const char *name)=0 |
Create a mesh factory wrapper for an existing mesh factory Assign to a csRef. | |
virtual csPtr< iMeshFactoryWrapper > | CreateMeshFactory (const char *name)=0 |
Create an uninitialized mesh factory wrapper Assign to a csRef. | |
virtual csPtr< iLoaderContext > | CreateLoaderContext (iRegion *region=0, bool curRegOnly=true)=0 |
Create a loader context that you can give to loader plugins. | |
virtual csPtr< iMeshFactoryWrapper > | LoadMeshFactory (const char *name, const char *loaderClassId, iDataBuffer *input)=0 |
Convenience function to load a mesh factory from a given loader plugin. | |
virtual csPtr< iMeshWrapper > | CreateMeshWrapper (iMeshFactoryWrapper *factory, const char *name, iSector *sector=0, const csVector3 &pos=csVector3(0, 0, 0))=0 |
Convenience function to create a mesh object for a given factory. | |
virtual csPtr< iMeshWrapper > | CreateMeshWrapper (iMeshObject *meshobj, const char *name, iSector *sector=0, const csVector3 &pos=csVector3(0, 0, 0))=0 |
Create a mesh wrapper for an existing mesh object. | |
virtual csPtr< iMeshWrapper > | CreateMeshWrapper (const char *classid, const char *name, iSector *sector=0, const csVector3 &pos=csVector3(0, 0, 0))=0 |
Create a mesh wrapper from a class id. | |
virtual csPtr< iMeshWrapper > | CreateMeshWrapper (const char *name)=0 |
Create an uninitialized mesh wrapper Assign to a csRef. | |
virtual csPtr< iMeshWrapper > | LoadMeshWrapper (const char *name, const char *loaderClassId, iDataBuffer *input, iSector *sector, const csVector3 &pos)=0 |
Convenience function to load a mesh object from a given loader plugin. | |
virtual csPtr< iMeshWrapper > | CreatePortalContainer (const char *name, iSector *sector=0, const csVector3 &pos=csVector3(0, 0, 0))=0 |
Create an empty portal container in some sector. | |
virtual csPtr< iMeshWrapper > | CreatePortal (const char *name, iMeshWrapper *parentMesh, iSector *destSector, csVector3 *vertices, int num_vertices, iPortal *&portal)=0 |
Convenience function to create a portal from one sector to another and make this portal a child mesh of another mesh. | |
virtual csPtr< iMeshWrapper > | CreatePortal (const char *name, iSector *sourceSector, const csVector3 &pos, iSector *destSector, csVector3 *vertices, int num_vertices, iPortal *&portal)=0 |
Convenience function to create a portal from one sector to another. | |
virtual void | Draw (iCamera *c, iClipper2D *clipper)=0 |
Draw the 3D world given a camera and a clipper. | |
virtual void | SetContext (iTextureHandle *ctxt)=0 |
Set the drawing context. | |
virtual iTextureHandle * | GetContext () const=0 |
Return the current drawing context. | |
virtual void | SetAmbientLight (const csColor &)=0 |
Set the amount of ambient light. | |
virtual void | GetAmbientLight (csColor &) const=0 |
Return the amount of ambient light. | |
virtual int | GetNearbyLights (iSector *sector, const csVector3 &pos, iLight **lights, int max_num_lights)=0 |
This routine returns all lights which might affect an object at some position. | |
virtual int | GetNearbyLights (iSector *sector, const csBox3 &box, iLight **lights, int max_num_lights)=0 |
This routine returns all lights which might affect an object with some bounding box. | |
virtual csPtr< iSectorIterator > | GetNearbySectors (iSector *sector, const csVector3 &pos, float radius)=0 |
This routine returns an iterator to iterate over all nearby sectors. | |
virtual csPtr< iObjectIterator > | GetNearbyObjects (iSector *sector, const csVector3 &pos, float radius, bool crossPortals=true)=0 |
This routine returns an iterator to iterate over all objects that are within a radius of a given position. | |
virtual csPtr< iMeshWrapperIterator > | GetNearbyMeshes (iSector *sector, const csVector3 &pos, float radius, bool crossPortals=true)=0 |
This routine returns an iterator to iterate over all meshes that are within a radius of a given position. | |
virtual csPtr< iObjectIterator > | GetVisibleObjects (iSector *sector, const csVector3 &pos)=0 |
This routine returns an iterator to iterate over all objects that are potentially visible as seen from a given position. | |
virtual csPtr< iMeshWrapperIterator > | GetVisibleMeshes (iSector *sector, const csVector3 &pos)=0 |
This routine returns an iterator to iterate over all meshes that are potentially visible as seen from a given position. | |
virtual csPtr< iObjectIterator > | GetVisibleObjects (iSector *sector, const csFrustum &frustum)=0 |
This routine returns an iterator to iterate over all objects that are potentially visible as seen from a given position. | |
virtual csPtr< iMeshWrapperIterator > | GetVisibleMeshes (iSector *sector, const csFrustum &frustum)=0 |
This routine returns an iterator to iterate over all meshes that are potentially visible as seen from a given position. | |
virtual bool | RemoveObject (iBase *object)=0 |
Convenience function to 'remove' a CS object from the engine. | |
virtual void | SetCacheManager (iCacheManager *cache_mgr)=0 |
Set the cache manager that the engine will use. | |
virtual iCacheManager * | GetCacheManager ()=0 |
Get the cache manager that the engine is currently using. | |
virtual void | GetDefaultAmbientLight (csColor &c) const=0 |
Return the default amount of ambient light. | |
virtual csPtr< iFrustumView > | CreateFrustumView ()=0 |
Create a iFrustumView instance that you can give to iVisibilityCuller->CastShadows(). | |
virtual csPtr< iObjectWatcher > | CreateObjectWatcher ()=0 |
Create an object watcher instance that you can use to watch other objects. | |
virtual void | WantToDie (iMeshWrapper *mesh)=0 |
Sometimes a mesh wants to destruct itself (for example a particle system that has only limited lifetime). | |
virtual iRenderLoopManager * | GetRenderLoopManager ()=0 |
For NR: Retrieve the render loop manager. | |
virtual iRenderLoop * | GetCurrentDefaultRenderloop ()=0 |
For NR: Returns the current render loop. | |
virtual bool | SetCurrentDefaultRenderloop (iRenderLoop *loop)=0 |
Set the current render loop. | |
virtual uint | GetCurrentFrameNumber () const=0 |
Get the current framenumber. |
Detailed Description
This interface is the main interface to the 3D engine.The engine is responsible for creating new engine-specific objects such as sectors, mesh objects, mesh object factories, lights, and so on.
Main creators of instances implementing this interface:
- 3D Engine plugin (crystalspace.engine.3d)
- Application.
Definition at line 142 of file engine.h.
Member Function Documentation
|
Clear all render priorities.
|
|
Create a base material that can be used to give to the texture manager. This version also supports texture layers. Assign to a csRef.
|
|
Create a base material that can be used to give to the texture manager. Assign to a csRef.
|
|
Create a black texture. This is mostly useful for procedural textures.
|
|
Create a new camera. Assign to a csRef. |
|
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. |
|
Create a static/pseudo-dynamic light. Assign to a csRef.
Note! If you are using a system with hardware accelerated lighting (i.e. no lightmaps) then the discussion above is not relevant. |
|
Create a loader context that you can give to loader plugins. It will basically allow loader plugins to find materials.
|
|
Register a material to be loaded during Prepare().
|
|
Create an uninitialized mesh factory wrapper Assign to a csRef.
|
|
Create a mesh factory wrapper for an existing mesh factory Assign to a csRef.
|
|
Convenience function to create a mesh factory from a given type.
|
|
Create an uninitialized mesh wrapper Assign to a csRef.
|
|
Create a mesh wrapper from a class id. This function will first make a factory from the plugin and then see if that factory itself implements iMeshObject too. This means this function is useful to create thing mesh objects (which are both factory and object at the same time). If that fails this function will call NewInstance() on the factory and return that object then.
|
|
Create a mesh wrapper for an existing mesh object.
|
|
Convenience function to create a mesh object for a given factory.
|
|
Create an object watcher instance that you can use to watch other objects. The engine will not keep a reference to this object. |
|
Convenience function to create a portal from one sector to another. Use SCF_QUERY_INTERFACE with iPortalContainer on the returned mesh for more control over the portal(s) in the portal object.
|
|
Convenience function to create a portal from one sector to another and make this portal a child mesh of another mesh. Use SCF_QUERY_INTERFACE with iPortalContainer on the returned mesh for more control over the portal(s) in the portal object.
|
|
Create an empty portal container in some sector. Use this portal container to create portals to other sectors. Use SCF_QUERY_INTERFACE with iPortalContainer on the mesh object inside the returned mesh to control the portals.
|
|
Create a new region and add it to the region list. If the region already exists then this function will just return the pointer to that region.
|
|
Create a empty sector with given name.
|
|
Convenience 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.
|
|
Create a texture from a file.
|
|
Convenience 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.
|
|
Delete everything in the engine.
|
|
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. |
|
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 0 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 0 if that region doesn't contain the object or the region doesn't exist. In this case the region parameter is ignored.
|
|
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 0 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 0 if that region doesn't contain the object or the region doesn't exist. In this case the region parameter is ignored.
|
|
Find a static/pseudo-dynamic light by name.
|
|
Find a static/pseudo-dynamic light by id.
|
|
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 0 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 0 if that region doesn't contain the object or the region doesn't exist. In this case the region parameter is ignored.
|
|
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 0 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 0 if that region doesn't contain the object or the region doesn't exist. In this case the region parameter is ignored.
|
|
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 0 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 0 if that region doesn't contain the object or the region doesn't exist. In this case the region parameter is ignored.
|
|
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 0 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 0 if that region doesn't contain the object or the region doesn't exist. In this case the region parameter is ignored.
|
|
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 0 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 0 if that region doesn't contain the object or the region doesn't exist. In this case the region parameter is ignored.
|
|
Force a relight for the given light. This is useful to update the lightmaps after a static or pseudo-dynamic light has been added (don't use this for dynamic lights). If there are a lot of objects this function can be slow. The optional region can be given to limit calculation to objects in the region. The current flags set with SetLightingCacheMode() controls if the lightmaps will be cached or not.
|
|
Force a relight of all lighting. It is better to call this instead of calling engine->Prepare() again as engine->Prepare() will also do other stuff (like registering textures). Warning! This function can be very slow (depending on the number of lights and objects in the world). The optional region can be given to limit calculation to objects in the region. The current flags set with SetLightingCacheMode() controls if the lightmaps will be cached or not.
|
|
Get the render priority for alpha objects (attached to 'alpha' name).
|
|
Return the amount of ambient light.
|
|
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. Use SetClearZBuf() to let this function return that the Z-buffer must be cleared. |
|
Get the cache manager that the engine is currently using.
|
|
Get the list of camera positions.
|
|
Get the value of the clear screen flag set with SetClearScreen().
|
|
Get the value of the clear Z-buffer flag set with SetClearZBuf().
|
|
Get the list of collections.
|
|
Return the current drawing context.
|
|
For NR: Returns the current render loop.
|
|
Get the current framenumber. This should be incremented once every Draw |
|
Return the default amount of ambient light.
|
|
Get default clear screen flag.
|
|
Get default clear z-buffer flag.
|
|
Retrieve default maximum lightmap size.
|
|
Get the mode for the lighting cache.
|
|
Create an iterator to iterate over all static lights of the engine. Assign to a csRef.
|
|
Get the list of all materials.
|
|
Get the maximum aspect ratio for lightmaps.
|
|
Retrieve maximum lightmap size.
|
|
Get the list of meshes.
|
|
Get the list of mesh factories.
|
|
This routine returns all lights which might affect an object with some bounding box.
|
|
This routine returns all lights which might affect an object at some position.
|
|
This routine returns an iterator to iterate over all meshes that are within a radius of a given position. If crossPortals is true it will search through portals. Otherwise it will limit the search to the sector passed in. |
|
This routine returns an iterator to iterate over all objects that are within a radius of a given position. The current implementation only does meshes but in future lights will also be supported. 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. If you only want to have meshes then it is more efficient to call GetNearbyMeshes() as you can then avoid the call to SCF_QUERY_INTERFACE. |
|
This routine returns an iterator to iterate over all nearby sectors. Assign to a csRef. |
|
Get the render priority for general objects (attached to 'object' name).
|
|
Get the render priority for portal objects (attached to 'portal' name).
|
|
Get the list of all regions.
|
|
For NR: Retrieve the render loop manager.
|
|
Get a render priority by name.
|
|
Get the number of render priorities.
|
|
Get the name of the render priority or 0 if none existant.
|
|
Get the render priority sorting flag.
|
|
Get the render priority sorting flag.
|
|
Get the list of sectors.
|
|
Get the render priority for sky objects (attached to 'sky' name).
|
|
Query the format to load textures (usually this depends on texture manager).
|
|
Get the list of all textures.
|
|
Get the top-level clipper.
|
|
Get the list of all shared variables.
|
|
This routine returns an iterator to iterate over all meshes that are potentially visible as seen from a given position. This routine has a frustum restricting the view. CURRENTLY NOT IMPLEMENTED! |
|
This routine returns an iterator to iterate over all meshes that are potentially visible as seen from a given position. This routine assumes full 360 degree visibility. CURRENTLY NOT IMPLEMENTED! |
|
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. If you only want meshes then use GetVisibleMeshes(). CURRENTLY NOT IMPLEMENTED! |
|
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. If you only want meshes then use GetVisibleMeshes(). CURRENTLY NOT IMPLEMENTED! |
|
Get the render priority for wall objects (attached to 'wall' name).
|
|
Convenience function to load a mesh factory from a given loader plugin.
|
|
Convenience function to load a mesh object from a given loader plugin.
|
|
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. The behaviour regarding cached lighting depends on the flag you can set with the SetLightingCacheMode() function. The default behaviour is to read the lightmap cache when present but don't calculate lighting if cache is not present.
|
|
Calls UpdateMove for all meshes to initialise bsp bounding boxes. Call this after creating a BSP tree. Prepare() will call this function automatically so you normally don't have to call it. |
|
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. |
|
Get the iObject for the engine.
|
|
Register a new render priority. Render priorities are assigned to objects and controls the order in which objects are rendered by the engine.
|
|
Remove a light and update all lightmaps. This function only works correctly for dynamic or pseudo-dynamic static lights. If you give a normal static light then the light will be removed but lightmaps will not be affected. You can call ForceRelight() to force relighting then. The current flags set with SetLightingCacheMode() controls if the lightmaps will be cached or not.
|
|
Convenience 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, iLight, 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. |
|
Reset a subset of flags/settings (which may differ from one world/map to another) to its defaults. This currently includes:
|
|
Set the amount of ambient light. This has no effect until you recalculate the lightmaps. |
|
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. |
|
Require that the screen is cleared every frame. The engine itself will not use this setting but will only return the correct flag in GetBeginDrawFlags() so that the screen is actually cleared. Note that this requires that the application actually uses GetBeginDrawFlags() in the call to g3d->BeginDraw() (which it should). By default this flag is false. It is useful to set this flag to true if you have a level that doesn't itself have another way to initialize the screen.
|
|
Require that the Z-buffer is cleared every frame. The engine itself will not use this setting but will only return the correct flag in GetBeginDrawFlags() so that the Z-buffer is actually cleared. Note that this requires that the application actually uses GetBeginDrawFlags() in the call to g3d->BeginDraw() (which it should). By default this flag is false. It is useful to set this flag to true if you have a level that doesn't itself have another way to initialize the Z-buffer.
|
|
Set the drawing context. This is a texture handle that is used as the procedural texture to render on. If this is 0 then the screen is assumed. |
|
Set the current render loop.
|
|
Set the mode for the lighting cache (combination of CS_ENGINE_CACHE_???). Default is CS_ENGINE_CACHE_READ | CS_ENGINE_CACHE_NOUPDATE.
|
|
Set the maximum lightmap dimensions. Polys with lightmaps larger than this are not lit.
|
|
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.
|
|
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. |
The documentation for this struct was generated from the following file:
- iengine/engine.h
Generated for Crystal Space by doxygen 1.2.18