CrystalSpace

Public API Reference

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

iSector Struct Reference
[Crystal Space 3D Engine]

The iSector interface is used to work with "sectors". More...

#include <sector.h>

Inheritance diagram for iSector:

iBase List of all members.

Public Methods

virtual csSectorGetPrivateObject ()=0
 @ Used by the engine to retrieve internal sector object (ugly). More...

virtual iObjectQueryObject ()=0
 Get the iObject for this sector. More...

virtual bool HasFog () const=0
 Has this sector fog? More...

virtual csFogGetFog () const=0
 Return the fog structure (even if fog is disabled). More...

virtual void SetFog (float density, const csColor &color)=0
 Fill the fog structure with the given values. More...

virtual void DisableFog ()=0
 Disable fog in this sector. More...

virtual iMeshListGetMeshes ()=0
 Get the list of meshes in this sector. More...

virtual iLightListGetLights ()=0
 Get the list of static and pseudo-dynamic lights in this sector. More...

virtual void ShineLights ()=0
 Calculate lighting for all objects in this sector. More...

virtual void ShineLights (iMeshWrapper *)=0
 Version of ShineLights() which only affects one mesh object. More...

virtual void SetDynamicAmbientLight (const csColor &color)=0
 Sets dynamic ambient light for all things in the sector. More...

virtual csColor GetDynamicAmbientLight () const=0
 Get the last set dynamic ambient light for this sector. More...

virtual void CalculateSectorBBox (csBox3 &bbox, bool do_meshes) const=0
 Calculate the bounding box of all objects in this sector. More...

virtual bool SetVisibilityCullerPlugin (const char *Name)=0
 Use the specified plugin as the visibility culler for this sector. More...

virtual iVisibilityCullerGetVisibilityCuller ()=0
 Get the visibility culler that is used for this sector. More...

virtual int GetRecLevel () const=0
 Get the current draw recursion level. More...

virtual iPolygon3DHitBeam (const csVector3 &start, const csVector3 &end, csVector3 &isect)=0
 Follow a beam from start to end and return the first polygon that is hit. More...

virtual iMeshWrapperHitBeam (const csVector3 &start, const csVector3 &end, csVector3 &intersect, iPolygon3D **polygonPtr, bool accurate=false)=0
 Follow a beam from start to end and return the first object that is hit. More...

virtual iSector * FollowSegment (csReversibleTransform &t, csVector3 &new_position, bool &mirror, bool only_portals=false)=0
 Follow a segment starting at this sector. More...

virtual void Draw (iRenderView *rview)=0
 Draw the sector with the given render view. More...

virtual void SetSectorCallback (iSectorCallback *cb)=0
 Set the sector callback. More...

virtual void RemoveSectorCallback (iSectorCallback *cb)=0
 Remove a sector callback. More...

virtual int GetSectorCallbackCount () const=0
 Get the number of sector callbacks. More...

virtual iSectorCallbackGetSectorCallback (int idx) const=0
 Get the specified sector callback. More...

virtual void CheckFrustum (iFrustumView *lview)=0
 Used for portal traversal. More...


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.

Definition at line 81 of file iengine/sector.h.


Member Function Documentation

virtual void iSector::CalculateSectorBBox csBox3   bbox,
bool    do_meshes
const [pure virtual]
 

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.

virtual void iSector::CheckFrustum iFrustumView   lview [pure virtual]
 

Used for portal traversal.

virtual void iSector::DisableFog   [pure virtual]
 

Disable fog in this sector.

virtual void iSector::Draw iRenderView   rview [pure virtual]
 

Draw the sector with the given render view.

virtual iSector* iSector::FollowSegment csReversibleTransform   t,
csVector3   new_position,
bool &    mirror,
bool    only_portals = false
[pure virtual]
 

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.

virtual csColor iSector::GetDynamicAmbientLight   const [pure virtual]
 

Get the last set dynamic ambient light for this sector.

virtual csFog* iSector::GetFog   const [pure virtual]
 

Return the fog structure (even if fog is disabled).

virtual iLightList* iSector::GetLights   [pure virtual]
 

Get the list of static and pseudo-dynamic lights in this sector.

Do NOT add dynamic lights to this list. For a dynamic light you only have to call SetSector() on those dynamic lights.

virtual iMeshList* iSector::GetMeshes   [pure virtual]
 

Get the list of meshes in this sector.

virtual csSector* iSector::GetPrivateObject   [pure virtual]
 

@ Used by the engine to retrieve internal sector object (ugly).

@

Referenced by csCamera::Camera::SetSector.

virtual int iSector::GetRecLevel   const [pure virtual]
 

Get the current draw recursion level.

virtual iSectorCallback* iSector::GetSectorCallback int    idx const [pure virtual]
 

Get the specified sector callback.

virtual int iSector::GetSectorCallbackCount   const [pure virtual]
 

Get the number of sector callbacks.

virtual iVisibilityCuller* iSector::GetVisibilityCuller   [pure virtual]
 

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.

virtual bool iSector::HasFog   const [pure virtual]
 

Has this sector fog?

virtual iMeshWrapper* iSector::HitBeam const csVector3   start,
const csVector3   end,
csVector3   intersect,
iPolygon3D **    polygonPtr,
bool    accurate = false
[pure virtual]
 

Follow a beam from start to end and return the first object that is hit.

In case it is a thing the iPolygon3D field will be filled with the polygon that was hit. If polygonPtr is null then the polygon will not be filled in.

virtual iPolygon3D* iSector::HitBeam const csVector3   start,
const csVector3   end,
csVector3   isect
[pure virtual]
 

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.

virtual iObject* iSector::QueryObject   [pure virtual]
 

Get the iObject for this sector.

virtual void iSector::RemoveSectorCallback iSectorCallback   cb [pure virtual]
 

Remove a sector callback.

virtual void iSector::SetDynamicAmbientLight const csColor   color [pure virtual]
 

Sets dynamic ambient light for all things in the sector.

virtual void iSector::SetFog float    density,
const csColor   color
[pure virtual]
 

Fill the fog structure with the given values.

virtual void iSector::SetSectorCallback iSectorCallback   cb [pure virtual]
 

Set the sector callback.

This will call IncRef() on the callback So make sure you call DecRef() to release your own reference.

virtual bool iSector::SetVisibilityCullerPlugin const char *    Name [pure virtual]
 

Use the specified plugin as the visibility culler for this sector.

Returns false if the culler could not be loaded for some reason.

virtual void iSector::ShineLights iMeshWrapper   [pure virtual]
 

Version of ShineLights() which only affects one mesh object.

virtual void iSector::ShineLights   [pure virtual]
 

Calculate lighting for all objects in this sector.


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