class csSector : public csPolygonSet A sector is a convex hull of polygons
| | beam_busy How many times are we shining a specific light through this sector. |
| | cfg_reflections Configuration variable: number of allowed reflections for static lighting |
| | do_portals Option variable: render portals? If this variable is false portals are rendered as a solid polygon |
| | do_radiosity Option variable: do pseudo-radiosity? When pseudo-radiosity is enabled every polygon behaves as if it is a mirroring portal when lighting calculations are concerned |
| | do_things Option variable: render things? If this variable is false sprites and things are not rendered |
| | lights All static and pseudo-dynamic lights in this sector |
| | sprites List of sprites in this sector |
| | AddLight (csStatLight* light) Add a static or pseudo-dynamic light to this sector |
| | AddThing (csThing* thing) Add a thing to this sector |
| | CacheLightMaps () Cache the lightmaps for all polygons in this sector |
| | CalculateLighting (csLightView& lview) Update all lighting for all things and polygons in this sector and possibly traverse through portals to other sectors |
| | CreateLightMaps (IGraphics3D* g3d) Given the first lightmap as calculated by the lighting routines create the lightmaps for the other mipmap levels and also convert the lightmaps so that they are suitable for the 3D rasterizer |
| | csSector () Construct a sector |
| | Draw (csRenderView& rview) Draw the sector in the given view and with the given transformation |
| | FindLight (float x, float y, float z, float dist) Find a light with the given position and radius |
| | FollowSegment (csReversibleTransform& t, csVector3& new_position, bool& mirror) Follow a segment starting at this sector |
| | GetAmbientColor (int& r, int& g, int& b) Get ambient color valid in this sector |
| | GetFirstThing () Get the first thing in this sector |
| | GetStaticThing () Get the thing representing all non-moving things (all things which are moved into this thing will return IsMerged()==true) |
| | GetThing (const char* name) Find a thing with the given name |
| | GetVisibleThings (csLightView& lview, int& num_things) Get a list of all things which are visible in the given frustrum |
| | HitBeam (csVector3& start, csVector3& end) Follow a beam from start to end and return the first polygon that is hit |
| | InitLightMaps (bool do_cache = true) Init the lightmaps for all polygons in this sector |
| | IntersectSegment (const csVector3& start, const csVector3& end, csVector3& isect, float* pr = NULL) Intersect world-space segment with polygons of this sector |
| | IntersectSphere (csVector3& center, float radius, float* pr = NULL) Intersects world-space sphere with polygons of this set |
| | Prepare () Prepare all polygons for use |
| | SetAmbientColor (int r, int g, int b) Set the ambient color for this sector |
| | ShineLights (csProgressPulse* = 0) The whole setup starts with csWorld::shine_lights calling csSector::shine_lights for every sector in the world |
| | ShineLights (csThing*, csProgressPulse* = 0) Version of shine_lights() which only affects one thing. |
| | UseStaticBSP (int mode = BSP_MINIMIZE_SPLITS) Call this function to generate a BSP tree for all csThings in this sector |
| | ~csSector () Destroy this sector |
| | first_thing First thing in this sector. |
| | level_b Ambient light level for blue in this sector. |
| | level_g Ambient light level for green in this sector. |
| | level_r Ambient light level for red in this sector. |
| | static_bsp If this variable is not NULL then it is a BSP tree in this sector which includes all static (non-moving) csThings |
| | static_thing If static_bsp is not NULL then this is a pointer to the csThing which holds all polygons of the non-moving csThings |
| | visited |
| | CalculateLightingPolygons (csPolygonParentInt*, csPolygonInt** polygon, int num, void* data) This function is called by the BSP tree traversal routine to update the lighting for a number of polygons |
| | DrawPolygons (csPolygonParentInt*, csPolygonInt** polygon, int num, void* data) This function is called by the BSP tree traversal routine to draw a number of polygons |
| | DrawPolygonsFromQueue (csPolygon2DQueue* queue, csRenderView* rview) Draw a number of polygons from a queue (used with C buffer processing) |
| | TestQueuePolygons (csPolygonParentInt*, csPolygonInt** polygon, int num, void* data) This function is called by the BSP tree traversal routine to test polygons against the C buffer and add them to a queue if needed |
A sector is a convex hull of polygons. It is one of the base classes for the portal engine.
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 'pr' != NULL it will also return a value between 0 and 1
indicating where on the 'start'-'end' vector the intersection
happened.
This function is an extension of csPolygonSet::intersect_segment in
that it will also test for hits against things.
csObjVector lights
csThing* first_thing
int level_r
int level_g
int level_b
int visited
csBspTree* static_bsp
csThing* static_thing
static void* DrawPolygons(csPolygonParentInt*, csPolygonInt** polygon, int num, void* data)
static void* TestQueuePolygons(csPolygonParentInt*, csPolygonInt** polygon, int num, void* data)
static void* CalculateLightingPolygons(csPolygonParentInt*, csPolygonInt** polygon, int num, void* data)
void DrawPolygonsFromQueue(csPolygon2DQueue* queue, csRenderView* rview)
static bool do_portals
static bool do_things
static int cfg_reflections
static bool do_radiosity
int beam_busy
csSector()
virtual ~csSector()
virtual void Prepare()
void AddThing(csThing* thing)
void AddLight(csStatLight* light)
csStatLight* FindLight(float x, float y, float z, float dist)
csThing* GetThing(const char* name)
csThing* GetFirstThing()
csThing* GetStaticThing()
void UseStaticBSP(int mode = BSP_MINIMIZE_SPLITS)
void GetAmbientColor(int& r, int& g, int& b)
void SetAmbientColor(int r, int g, int b)
csPolygon3D* HitBeam(csVector3& start, csVector3& end)
void CreateLightMaps(IGraphics3D* g3d)
void Draw(csRenderView& rview)
void InitLightMaps(bool do_cache = true)
void CalculateLighting(csLightView& lview)
csThing** GetVisibleThings(csLightView& lview, int& num_things)
void CacheLightMaps()
csPolygon3D* IntersectSphere(csVector3& center, float radius, float* pr = NULL)
csSector* FollowSegment(csReversibleTransform& t, csVector3& new_position, bool& mirror)
virtual csPolygon3D* IntersectSegment(const csVector3& start, const csVector3& end, csVector3& isect, float* pr = NULL)
void ShineLights(csProgressPulse* = 0)
void ShineLights(csThing*, csProgressPulse* = 0)
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de