![]() |
Public API Reference |
#include <rview.h>
Inheritance diagram for csRenderView:
Public Methods | |
void | SetEngine (iEngine *engine) |
Set the engine. More... | |
void | SetCamera (iCamera *camera) |
Set the camera. More... | |
void | SetOriginalCamera (iCamera *camera) |
Set the original camera. More... | |
virtual iCamera * | GetOriginalCamera () const |
Get the original camera. More... | |
virtual csRenderContext * | GetRenderContext () |
Get the current render context. More... | |
virtual void | CreateRenderContext () |
Create a new render context. More... | |
virtual void | RestoreRenderContext (csRenderContext *original) |
Restore a render context. More... | |
virtual iCamera * | CreateNewCamera () |
Create a new camera in the current render context. More... | |
virtual iEngine * | GetEngine () |
Get the engine. More... | |
virtual iGraphics2D * | GetGraphics2D () |
Get the 2D graphics subsystem. More... | |
virtual iGraphics3D * | GetGraphics3D () |
Get the 3D graphics subsystem. More... | |
virtual void | SetFrustum (float lx, float rx, float ty, float by) |
Set the view frustum at z=1. More... | |
virtual void | GetFrustum (float &lx, float &rx, float &ty, float &by) |
Get the frustum. More... | |
virtual csRenderContextFrustum * | GetTopFrustum () |
Get the top level frustum (corresponding with SetFrustum()). More... | |
virtual iClipper2D * | GetClipper () |
Get the 2D clipper for this view. More... | |
virtual void | SetClipper (iClipper2D *clip) |
Set the 2D clipper for this view. More... | |
virtual bool | IsClipperRequired () |
If true then we have to clip all objects to the portal frustum (returned with GetClipper()). More... | |
virtual bool | GetClipPlane (csPlane3 &pl) |
Get the 3D clip plane that should be used to clip all geometry. More... | |
virtual csPlane3 & | GetClipPlane () |
Get the clip plane. More... | |
virtual void | SetClipPlane (const csPlane3 &p) |
Set the 3D clip plane that should be used to clip all geometry. More... | |
virtual void | UseClipPlane (bool u) |
Enable the use of a clip plane. More... | |
virtual void | UseClipFrustum (bool u) |
Enable the use of a clip frustum. More... | |
virtual csFogInfo * | GetFirstFogInfo () |
Every fogged sector we encountered results in an extra structure in the following list. More... | |
virtual void | SetFirstFogInfo (csFogInfo *fi) |
Set the first fog info. More... | |
virtual bool | AddedFogInfo () |
Return true if fog info has been added. More... | |
virtual void | ResetFogInfo () |
Reset fog info. More... | |
virtual iCamera * | GetCamera () |
Get the current camera. More... | |
virtual void | CalculateFogPolygon (G3DPolygonDP &poly) |
Calculate the fog information in the given G3DPolygonDP structure. More... | |
virtual void | CalculateFogPolygon (G3DPolygonDPFX &poly) |
Calculate the fog information in the given G3DPolygonDPFX structure. More... | |
virtual void | CalculateFogMesh (const csTransform &tr_o2c, G3DTriangleMesh &mesh) |
Calculate the fog information in the given G3DTriangleMesh structure. More... | |
virtual void | CalculateFogMesh (const csTransform &tr_o2c, G3DPolygonMesh &mesh) |
Calculate the fog information in the given G3DPolygonMesh structure. More... | |
virtual bool | TestBSphere (const csReversibleTransform &o2c, const csSphere &sphere) |
Test if the given bounding sphere (in object space coordinates) is visibile in this render view. More... | |
virtual bool | ClipBSphere (const csReversibleTransform &o2c, const csSphere &sphere, int &clip_portal, int &clip_plane, int &clip_z_plane) |
Check if the given bounding sphere (in object space coordinates) is visibile in this render view. More... | |
virtual bool | ClipBBox (const csBox2 &sbox, const csBox3 &cbox, int &clip_portal, int &clip_plane, int &clip_z_plane) |
Check if the screen bounding box of an object is visible in this render view. More... | |
virtual iSector * | GetThisSector () |
Get current sector. More... | |
virtual void | SetThisSector (iSector *s) |
Set the current sector. More... | |
virtual iSector * | GetPreviousSector () |
Get previous sector. More... | |
virtual void | SetPreviousSector (iSector *s) |
Set the previous sector. More... | |
virtual iPolygon3D * | GetPortalPolygon () |
Get the portal polygon. More... | |
virtual void | SetPortalPolygon (iPolygon3D *por) |
Set the portal polygon. More... | |
virtual int | GetRenderRecursionLevel () |
Get render recursion level. More... | |
virtual void | SetRenderRecursionLevel (int rec) |
Set render recursion level. More... | |
virtual void | AttachRenderContextData (void *key, iBase *data) |
Attach data to the current render context. More... | |
virtual iBase * | FindRenderContextData (void *key) |
Look for data on the current render context. More... | |
virtual void | DeleteRenderContextData (void *key) |
Delete all data with the given key on the current render context. More... |
It is modified while rendering according to portals/warping portals and such.
Definition at line 43 of file csengine/rview.h.
|
Return true if fog info has been added.
Implements iRenderView. Definition at line 231 of file csengine/rview.h. References csRenderContext::added_fog_info. |
|
Attach data to the current render context.
Implements iRenderView. |
|
Calculate the fog information in the given G3DPolygonMesh structure. This function assumes the fog array is already preallocated and the rest of the structure should be filled in. This function will take care of correctly enabling/disabling fog. Implements iRenderView. |
|
Calculate the fog information in the given G3DTriangleMesh structure. This function assumes the fog array is already preallocated and the rest of the structure should be filled in. This function will take care of correctly enabling/disabling fog. Implements iRenderView. |
|
Calculate the fog information in the given G3DPolygonDPFX structure.
Implements iRenderView. |
|
Calculate the fog information in the given G3DPolygonDP structure.
Implements iRenderView. |
|
Check if the screen bounding box of an object is visible in this render view. If true is returned (visible) then clip_plane, clip_z_plane, and clip_portal will be set to the right value depending on wether or not clipping is wanted. This function also does far plane clipping. Implements iRenderView. |
|
Check if the given bounding sphere (in object space coordinates) is visibile in this render view. The given transformation should transform object to camera space. If the sphere is visible this function will also initialize the clip_plane, clip_z_plane, and clip_portal fields which can be used for DrawTriangleMesh or DrawPolygonMesh. Implements iRenderView. |
|
Create a new camera in the current render context. This function will create a new camera based on the current one. The new camera reference is returned. Implements iRenderView. |
|
Create a new render context. This is typically used when going through a portal. Note that you should remember the old render context if you want to restore it later. The render context will get all the values from the current context (with SCF references properly incremented). Implements iRenderView. |
|
Delete all data with the given key on the current render context.
Implements iRenderView. |
|
Look for data on the current render context.
Implements iRenderView. |
|
Get the current camera.
Implements iRenderView. Definition at line 241 of file csengine/rview.h. References csRenderContext::icamera. |
|
Get the 2D clipper for this view.
Implements iRenderView. Definition at line 178 of file csengine/rview.h. References csRenderContext::iview. |
|
Get the clip plane.
Implements iRenderView. Definition at line 201 of file csengine/rview.h. References csRenderContext::clip_plane. |
|
Get the 3D clip plane that should be used to clip all geometry. If this function returns false then this plane is invalid and should not be used. Otherwise it must be used to clip the object before drawing. Implements iRenderView. Definition at line 195 of file csengine/rview.h. References csRenderContext::clip_plane, and csRenderContext::do_clip_plane. |
|
Get the engine.
Implements iRenderView. Definition at line 152 of file csengine/rview.h. |
|
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. This function will return the first csFogInfo instance. Implements iRenderView. Definition at line 219 of file csengine/rview.h. References csRenderContext::fog_info. |
|
Get the frustum.
Implements iRenderView. Definition at line 160 of file csengine/rview.h. |
|
Get the 2D graphics subsystem.
Implements iRenderView. Definition at line 154 of file csengine/rview.h. |
|
Get the 3D graphics subsystem.
Implements iRenderView. Definition at line 156 of file csengine/rview.h. |
|
Get the original camera.
Implements iRenderView. Definition at line 121 of file csengine/rview.h. |
|
Get the portal polygon.
Implements iRenderView. Definition at line 322 of file csengine/rview.h. References csRenderContext::portal_polygon. |
|
Get previous sector.
Implements iRenderView. Definition at line 314 of file csengine/rview.h. References csRenderContext::previous_sector. |
|
Get the current render context.
Implements iRenderView. Definition at line 126 of file csengine/rview.h. |
|
Get render recursion level.
Implements iRenderView. Definition at line 330 of file csengine/rview.h. References csRenderContext::draw_rec_level. |
|
Get current sector.
Implements iRenderView. Definition at line 304 of file csengine/rview.h. References csRenderContext::this_sector. |
|
Get the top level frustum (corresponding with SetFrustum()).
Implements iRenderView. Definition at line 168 of file csengine/rview.h. |
|
If true then we have to clip all objects to the portal frustum (returned with GetClipper()). Normally this is not needed but some portals require this. If GetClipPlane() returns true then the value of this function is also implied to be true. Implements iRenderView. Definition at line 188 of file csengine/rview.h. References csRenderContext::do_clip_frustum. |
|
Reset fog info.
Implements iRenderView. Definition at line 235 of file csengine/rview.h. References csRenderContext::added_fog_info. |
|
Restore a render context. Use this to restore a previously overwritten render context. This function will take care of properly cleaning up the current render context. Implements iRenderView. |
|
Set the camera.
|
|
Set the 2D clipper for this view.
Implements iRenderView. |
|
Set the 3D clip plane that should be used to clip all geometry.
Implements iRenderView. Definition at line 206 of file csengine/rview.h. References csRenderContext::clip_plane. |
|
Set the engine.
|
|
Set the first fog info.
Implements iRenderView. Definition at line 223 of file csengine/rview.h. References csRenderContext::added_fog_info, and csRenderContext::fog_info. |
|
Set the view frustum at z=1.
Implements iRenderView. |
|
Set the original camera.
|
|
Set the portal polygon.
Implements iRenderView. Definition at line 324 of file csengine/rview.h. References csRenderContext::portal_polygon. |
|
Set the previous sector.
Implements iRenderView. Definition at line 319 of file csengine/rview.h. References csRenderContext::previous_sector. |
|
Set render recursion level.
Implements iRenderView. Definition at line 334 of file csengine/rview.h. References csRenderContext::draw_rec_level. |
|
Set the current sector.
Implements iRenderView. Definition at line 309 of file csengine/rview.h. References csRenderContext::this_sector. |
|
Test if the given bounding sphere (in object space coordinates) is visibile in this render view. The transformation will transform object to camera space. Implements iRenderView. |
|
Enable the use of a clip frustum.
Implements iRenderView. Definition at line 210 of file csengine/rview.h. References csRenderContext::do_clip_frustum. |
|
Enable the use of a clip plane.
Implements iRenderView. Definition at line 208 of file csengine/rview.h. References csRenderContext::do_clip_plane. |