iSector Struct Reference
[Crystal Space 3D Engine]
The iSector interface is used to work with "sectors".
More...
#include <iengine/sector.h>
Inheritance diagram for iSector:

Public Member Functions | |
virtual iObject * | QueryObject ()=0 |
Get the iObject for this sector. | |
virtual void | SetRenderLoop (iRenderLoop *rl)=0 |
Set the renderloop to use for this sector. | |
virtual iRenderLoop * | GetRenderLoop ()=0 |
Get the renderloop for this sector. | |
virtual bool | HasFog () const =0 |
Has this sector fog? | |
virtual csFog * | GetFog () const =0 |
Return the fog structure (even if fog is disabled). | |
virtual void | SetFog (float density, const csColor &color)=0 |
Fill the fog structure with the given values. | |
virtual void | DisableFog ()=0 |
Disable fog in this sector. | |
virtual iMeshList * | GetMeshes ()=0 |
Get the list of meshes in this sector. | |
virtual iLightList * | GetLights ()=0 |
Get the list of static and pseudo-dynamic lights in this sector. | |
virtual void | ShineLights ()=0 |
Calculate lighting for all objects in this sector. | |
virtual void | ShineLights (iMeshWrapper *)=0 |
Version of ShineLights() which only affects one mesh object. | |
virtual void | SetDynamicAmbientLight (const csColor &color)=0 |
Sets dynamic ambient light for all things in the sector. | |
virtual csColor | GetDynamicAmbientLight () const =0 |
Get the last set dynamic ambient light for this sector. | |
virtual void | CalculateSectorBBox (csBox3 &bbox, bool do_meshes) const =0 |
Calculate the bounding box of all objects in this sector. | |
virtual bool | SetVisibilityCullerPlugin (const char *name, iDocumentNode *culler_params=0)=0 |
Use the specified plugin as the visibility culler for this sector. | |
virtual iVisibilityCuller * | GetVisibilityCuller ()=0 |
Get the visibility culler that is used for this sector. | |
virtual int | GetRecLevel () const =0 |
Get the current draw recursion level. | |
virtual void | IncRecLevel ()=0 |
Add one draw recursion level. | |
virtual void | DecRecLevel ()=0 |
Remove one draw recursion level. | |
virtual iMeshWrapper * | HitBeamPortals (const csVector3 &start, const csVector3 &end, csVector3 &isect, int *polygon_idx)=0 |
Follow a beam from start to end and return the first polygon that is hit. | |
virtual iMeshWrapper * | HitBeam (const csVector3 &start, const csVector3 &end, csVector3 &intersect, int *polygon_idx, bool accurate=false)=0 |
Follow a beam from start to end and return the first object that is hit. | |
virtual iSector * | FollowSegment (csReversibleTransform &t, csVector3 &new_position, bool &mirror, bool only_portals=false)=0 |
Follow a segment starting at this sector. | |
virtual void | Draw (iRenderView *rview)=0 |
Draw the sector with the given render view. | |
virtual void | PrepareDraw (iRenderView *rview)=0 |
Prepare the sector to draw. | |
virtual csRenderMeshList * | GetVisibleMeshes (iRenderView *)=0 |
Get a set of visible meshes for given camera. | |
virtual void | SetSectorCallback (iSectorCallback *cb)=0 |
Set the sector callback. | |
virtual void | RemoveSectorCallback (iSectorCallback *cb)=0 |
Remove a sector callback. | |
virtual int | GetSectorCallbackCount () const =0 |
Get the number of sector callbacks. | |
virtual iSectorCallback * | GetSectorCallback (int idx) const =0 |
Get the specified sector callback. | |
virtual void | AddSectorMeshCallback (iSectorMeshCallback *cb)=0 |
Add a mesh callback. | |
virtual void | RemoveSectorMeshCallback (iSectorMeshCallback *cb)=0 |
Remove a mesh callback. | |
virtual void | CheckFrustum (iFrustumView *lview)=0 |
Used for portal traversal. | |
virtual const csSet< iMeshWrapper * > & | GetPortalMeshes () const =0 |
Get the set of meshes containing portals that leave from this sector. | |
virtual void | RegisterPortalMesh (iMeshWrapper *mesh)=0 |
Register a mesh with a portal. | |
virtual void | UnregisterPortalMesh (iMeshWrapper *mesh)=0 |
Unregister a mesh with a portal. | |
virtual void | UnlinkObjects ()=0 |
Unlink all mesh objects from this sector. |
Detailed Description
The iSector interface is used to work with "sectors".A "sector" is an empty region of space that can contain other objects (mesh objects). A sector itself does not represent geometry but only contains other geometry. A sector does contain lights though. The sector is the basic building block for any Crystal Space level. A level can be made from one or more sectors. Using the thing mesh object one can use portals to connect multiple sectors.
Main creators of instances implementing this interface:
Main ways to get pointers to this interface:- iEngine::FindSector()
- iSectorList::Get()
- iSectorList::FindByName()
- iLoaderContext::FindSector()
- iPortal::GetSector()
- iCamera::GetSector()
Definition at line 122 of file sector.h.
Member Function Documentation
|
Add a mesh callback. This will call IncRef() on the callback So make sure you call DecRef() to release your own reference. |
|
Calculate the bounding box of all objects in this sector. This function is not very efficient as it will traverse all objects in the sector one by one and compute a bounding box from that. |
|
Used for portal traversal.
|
|
Remove one draw recursion level.
|
|
Disable fog in this sector.
|
|
Draw the sector with the given render view.
|
|
Follow a segment starting at this sector. If the segment intersects with a polygon it will stop there unless the polygon is a portal in which case it will recursively go to that sector (possibly applying warping transformations) and continue there. This routine will modify all the given parameters to reflect space warping. These should be used as the new camera transformation when you decide to really go to the new position. This function returns the resulting sector and new_position will be set to the last position that you can go to before hitting a wall. If only_portals is true then only portals will be checked. This means that intersection with normal polygons is not checked. This is a lot faster but it does mean that you need to use another collision detection system to test with walls. |
|
Get the last set dynamic ambient light for this sector.
|
|
Return the fog structure (even if fog is disabled).
|
|
Get the list of static and pseudo-dynamic lights in this sector.
|
|
Get the list of meshes in this sector.
|
|
Get the set of meshes containing portals that leave from this sector. Note that portals are uni-directional. The portals represented by this list are portals that are on some mesh object that is actually located in this sector. |
|
Get the current draw recursion level.
|
|
Get the renderloop for this sector. If this returns 0 then it means there is no specific renderloop for this sector. In that case the default renderloop in the engine will be used. |
|
Get the specified sector callback.
|
|
Get the number of sector callbacks.
|
|
Get the visibility culler that is used for this sector. If there is no culler yet a culler of type 'crystalspace.culling.frustvis' will be created and used for this sector. |
|
Get a set of visible meshes for given camera. These will be cached for a given frame and camera, but if the cached result isn't enough it will be reculled. The returned pointer is valid as long as the sector exsist (the sector will delete it) |
|
Has this sector fog?
|
|
Follow a beam from start to end and return the first object that is hit. In case it is a thing the polygon_idx field will be filled with the indices of the polygon that was hit. If polygon_idx is null then the polygon will not be filled in. This function doesn't support portals. |
|
Follow a beam from start to end and return the first polygon that is hit. This function correctly traverse portals and space warping portals. Normally the sector you call this on should be the sector containing the 'start' point. 'isect' will be the intersection point if a polygon is returned. This function returns -1 if no polygon was hit or the polygon index otherwise. |
|
Add one draw recursion level.
|
|
Prepare the sector to draw. Must be called before any rendermesh is requested. |
|
Get the iObject for this sector.
|
|
Register a mesh with a portal. @@ TO BE REMOVED... |
|
Remove a sector callback.
|
|
Remove a mesh callback.
|
|
Sets dynamic ambient light for all things in the sector.
|
|
Fill the fog structure with the given values.
|
|
Set the renderloop to use for this sector. If this is not set then the default engine renderloop will be used. |
|
Set the sector callback. This will call IncRef() on the callback So make sure you call DecRef() to release your own reference. |
|
Use the specified plugin as the visibility culler for this sector. Returns false if the culler could not be loaded for some reason. The optional culler parameters will be given to the new visibility culler. |
|
Version of ShineLights() which only affects one mesh object.
|
|
Calculate lighting for all objects in this sector.
|
|
Unlink all mesh objects from this sector. This will not remove the mesh objects but simply unlink them so that they are no longer part of this sector. This happens automatically when the sector is removed but you can force it by calling this function here. |
|
Unregister a mesh with a portal. @@ TO BE REMOVED... |
The documentation for this struct was generated from the following file:
- iengine/sector.h
Generated for Crystal Space by doxygen 1.3.9.1