CrystalSpace

Public API Reference

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

csRenderContext Class Reference
[Views & Cameras]

This structure keeps track of the current render context. More...

#include <iengine/rview.h>

List of all members.

Public Attributes

bool added_fog_info
 If the following variable is true then a fog_info was added in this recursion level.
csPlane3 clip_plane
 This variable holds the plane of the portal through which the camera is looking.
csPlane3 clip_planes [7]
 A set of clip planes for this context in world space.
uint32 clip_planes_mask
 A frustum masks which indicates which planes of clip_planes are used.
uint32 context_id
 This unique id can be used to check if you are still in the same render context.
bool do_clip_frustum
 If true then we have to clip all objects to the portal frustum (either in 2D or 3D).
bool do_clip_plane
 If true then we clip all objects to 'clip_plane'.
int draw_rec_level
 A number indicating the recursion level we are in.
csFogInfofog_info
 Every fogged sector we encountered results in an extra structure in the following list.
csPlane3 frustum [5]
csRef< iCameraicamera
 The current camera.
csRef< iClipper2Diview
 The 2D polygon describing how everything drawn inside should be clipped.
iPortallast_portal
 The last portal we traversed through (or 0 if first sector).
csRenderContextprevious
 A pointer back to the previous render context.
iSectorprevious_sector
 The previous sector (or 0 if the first sector).
iSectorthis_sector
 This sector.

Friends

class csRenderView


Detailed Description

This structure keeps track of the current render context.

It is used by iRenderView. When recursing through a portal a new render context will be created and set in place of the old one.

Definition at line 88 of file rview.h.


Member Data Documentation

bool csRenderContext::added_fog_info
 

If the following variable is true then a fog_info was added in this recursion level.

Definition at line 153 of file rview.h.

csPlane3 csRenderContext::clip_plane
 

This variable holds the plane of the portal through which the camera is looking.

Definition at line 119 of file rview.h.

csPlane3 csRenderContext::clip_planes[7]
 

A set of clip planes for this context in world space.

Definition at line 104 of file rview.h.

uint32 csRenderContext::clip_planes_mask
 

A frustum masks which indicates which planes of clip_planes are used.

Definition at line 106 of file rview.h.

uint32 csRenderContext::context_id
 

This unique id can be used to check if you are still in the same render context.

Checking on pointers is not safe since render contexts are reused so a different render context can result in the same pointer.

Definition at line 167 of file rview.h.

bool csRenderContext::do_clip_frustum
 

If true then we have to clip all objects to the portal frustum (either in 2D or 3D).

Normally this is not needed but some portals require this. If do_clip_plane is true then the value of this field is also implied to be true. The top-level portal should set do_clip_frustum to true in order for all geometry to be correctly clipped to screen boundaries.

Definition at line 141 of file rview.h.

bool csRenderContext::do_clip_plane
 

If true then we clip all objects to 'clip_plane'.

In principle one should always clip to 'clip_plane'. However, in many cases this is not required because portals mostly arrive in at the boundaries of a sector so there can actually be no objects after the portal plane. But it is possible that portals arive somewhere in the middle of a sector (for example with BSP sectors or with Things containing portals). In that case this variable will be set to true and clipping to 'clip_plane' is required.

Definition at line 131 of file rview.h.

int csRenderContext::draw_rec_level
 

A number indicating the recursion level we are in.

Starts with 0. Whenever the engine goes through a portal this number increases. Returning from a portal decreases the number again.

Definition at line 160 of file rview.h.

csFogInfo* csRenderContext::fog_info
 

Every fogged sector we encountered results in an extra structure in the following list.

This is only used if we are doing vertex based fog.

Definition at line 147 of file rview.h.

csRef<iCamera> csRenderContext::icamera
 

The current camera.

Definition at line 97 of file rview.h.

csRef<iClipper2D> csRenderContext::iview
 

The 2D polygon describing how everything drawn inside should be clipped.

Definition at line 99 of file rview.h.

iPortal* csRenderContext::last_portal
 

The last portal we traversed through (or 0 if first sector).

Definition at line 109 of file rview.h.

csRenderContext* csRenderContext::previous
 

A pointer back to the previous render context.

Definition at line 94 of file rview.h.

iSector* csRenderContext::previous_sector
 

The previous sector (or 0 if the first sector).

Definition at line 111 of file rview.h.

iSector* csRenderContext::this_sector
 

This sector.

Definition at line 113 of file rview.h.


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