CS::RenderManager::RenderView Class Reference
This structure represents all information needed for drawing a scene. More...
#include <csplugincommon/rendermanager/renderview.h>
Public Member Functions | |
bool | AddedFogInfo () const |
Return true if fog info has been added. | |
iCamera * | CreateNewCamera () |
Create a new camera in the current render context. | |
void | CreateRenderContext () |
Create a new render context. | |
virtual void | DestroyRenderContext (csRenderContext *context) |
Destroy a render context created with CreateRenderContext (). | |
virtual iCamera * | GetCamera () |
Get the current camera. | |
virtual iClipper2D * | GetClipper () |
Get the 2D clipper for this view. | |
csPlane3 & | GetClipPlane () |
Get the clip plane. | |
const csPlane3 & | GetClipPlane () const |
Get the clip plane. | |
bool | GetClipPlane (csPlane3 &pl) const |
Get the 3D clip plane that should be used to clip all geometry. | |
csRenderContext * | GetCsRenderContext () const |
Get the current render context. | |
virtual uint | GetCurrentFrameNumber () const |
Get the number of the current frame. | |
virtual iEngine * | GetEngine () |
Get the engine. | |
csFogInfo * | GetFirstFogInfo () |
Every fogged sector we encountered results in an extra structure in the following list. | |
virtual void | GetFrustum (float &lx, float &rx, float &ty, float &by) |
Get the frustum. | |
virtual iGraphics2D * | GetGraphics2D () |
Get the 2D graphics subsystem. | |
virtual iGraphics3D * | GetGraphics3D () |
Get the 3D graphics subsystem. | |
virtual iPortal * | GetLastPortal () |
Get the last portal. | |
const CS::Utility::MeshFilter & | GetMeshFilter () const |
Get the mesh filter for this view. | |
virtual iCamera * | GetOriginalCamera () const |
Get the original camera. | |
virtual iSector * | GetPreviousSector () |
Get previous sector. | |
virtual csRenderContext * | GetRenderContext () |
Get the current render context. | |
int | GetRenderRecursionLevel () const |
Get render recursion level. | |
virtual iSector * | GetThisSector () |
Get current sector. | |
int | GetViewHeight () const |
Get the height of the view rendered to. | |
int | GetViewWidth () const |
Get the width of the view rendered to. | |
void | InitialiseFromCamera (iCamera *camera) |
Initialise the RenderView from an iCamera. | |
void | InitialiseFromView (iView *view) |
Initialise the RenderView from an iView. | |
bool | IsClipperRequired () const |
If true then we have to clip all objects to the portal frustum (returned with GetClipper()). | |
RenderView (const RenderView &other, bool keepCamera) | |
Copy constructor, optionally keeping the camera. | |
RenderView (const RenderView &other) | |
Copy constructor. | |
RenderView (iView *v) | |
Construct. | |
RenderView (iCamera *c, iClipper2D *v, iGraphics3D *ig3d) | |
Construct. | |
RenderView (iCamera *c) | |
Construct. | |
RenderView () | |
Construct. | |
void | ResetFogInfo () |
Reset fog info. | |
void | RestoreRenderContext () |
Restore a render context. | |
void | SetCamera (iCamera *camera) |
Set the camera. | |
void | SetClipper (iClipper2D *clip) |
Set the 2D clipper for this view. | |
void | SetClipPlane (const csPlane3 &p) |
Set the 3D clip plane that should be used to clip all geometry. | |
void | SetCsRenderContext (csRenderContext *c) |
Set the current render context (only for temporary override). | |
void | SetEngine (iEngine *engine) |
Set the engine. | |
void | SetFirstFogInfo (csFogInfo *fi) |
Set the first fog info. | |
void | SetFrustum (float lx, float rx, float ty, float by) |
Set the view frustum at z=1. | |
void | SetLastPortal (iPortal *por) |
Set the last portal. | |
void | SetMeshFilter (const CS::Utility::MeshFilter &filter) |
Set the mesh filter for this view. | |
void | SetOriginalCamera (iCamera *camera) |
Set the original camera. | |
void | SetPreviousSector (iSector *s) |
Set the previous sector. | |
void | SetRenderRecursionLevel (int rec) |
Set render recursion level. | |
void | SetThisSector (iSector *s) |
Set the current sector. | |
void | SetViewDimensions (int w, int h) |
Set the dimensions of the view rendered to. | |
void | UseClipFrustum (bool u) |
Whether to enable clipping to the frustum. | |
void | UseClipPlane (bool u) |
Whether to enable clipping to the clip plane. |
Detailed Description
This structure represents all information needed for drawing a scene.
It is modified while rendering according to portals/warping portals and such.
Definition at line 47 of file renderview.h.
Constructor & Destructor Documentation
CS::RenderManager::RenderView::RenderView | ( | ) |
Construct.
CS::RenderManager::RenderView::RenderView | ( | iCamera * | c | ) |
Construct.
CS::RenderManager::RenderView::RenderView | ( | iCamera * | c, | |
iClipper2D * | v, | |||
iGraphics3D * | ig3d | |||
) |
Construct.
CS::RenderManager::RenderView::RenderView | ( | iView * | v | ) |
Construct.
CS::RenderManager::RenderView::RenderView | ( | const RenderView & | other | ) |
Copy constructor.
CS::RenderManager::RenderView::RenderView | ( | const RenderView & | other, | |
bool | keepCamera | |||
) |
Copy constructor, optionally keeping the camera.
Member Function Documentation
bool CS::RenderManager::RenderView::AddedFogInfo | ( | ) | const [inline] |
Return true if fog info has been added.
Definition at line 231 of file renderview.h.
iCamera* CS::RenderManager::RenderView::CreateNewCamera | ( | ) |
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.
void CS::RenderManager::RenderView::CreateRenderContext | ( | ) | [virtual] |
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.
virtual void CS::RenderManager::RenderView::DestroyRenderContext | ( | csRenderContext * | context | ) | [virtual] |
Destroy a render context created with CreateRenderContext ().
Implements iRenderView.
virtual iCamera* CS::RenderManager::RenderView::GetCamera | ( | ) | [inline, virtual] |
virtual iClipper2D* CS::RenderManager::RenderView::GetClipper | ( | ) | [inline, virtual] |
Get the 2D clipper for this view.
Implements iRenderView.
Definition at line 270 of file renderview.h.
csPlane3& CS::RenderManager::RenderView::GetClipPlane | ( | ) | [inline] |
Get the clip plane.
Definition at line 202 of file renderview.h.
const csPlane3& CS::RenderManager::RenderView::GetClipPlane | ( | ) | const [inline] |
Get the clip plane.
Definition at line 197 of file renderview.h.
bool CS::RenderManager::RenderView::GetClipPlane | ( | csPlane3 & | pl | ) | const [inline] |
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.
Definition at line 191 of file renderview.h.
csRenderContext* CS::RenderManager::RenderView::GetCsRenderContext | ( | ) | const [inline] |
Get the current render context.
Definition at line 121 of file renderview.h.
virtual uint CS::RenderManager::RenderView::GetCurrentFrameNumber | ( | ) | const [virtual] |
Get the number of the current frame.
Implements iRenderView.
virtual iEngine* CS::RenderManager::RenderView::GetEngine | ( | ) | [virtual] |
Get the engine.
Implements iRenderView.
csFogInfo* CS::RenderManager::RenderView::GetFirstFogInfo | ( | ) | [inline] |
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.
Definition at line 219 of file renderview.h.
virtual void CS::RenderManager::RenderView::GetFrustum | ( | float & | lx, | |
float & | rx, | |||
float & | ty, | |||
float & | by | |||
) | [inline, virtual] |
virtual iGraphics2D* CS::RenderManager::RenderView::GetGraphics2D | ( | ) | [inline, virtual] |
virtual iGraphics3D* CS::RenderManager::RenderView::GetGraphics3D | ( | ) | [inline, virtual] |
virtual iPortal* CS::RenderManager::RenderView::GetLastPortal | ( | ) | [inline, virtual] |
const CS::Utility::MeshFilter& CS::RenderManager::RenderView::GetMeshFilter | ( | ) | const [inline] |
Get the mesh filter for this view.
Definition at line 297 of file renderview.h.
virtual iCamera* CS::RenderManager::RenderView::GetOriginalCamera | ( | ) | const [inline, virtual] |
virtual iSector* CS::RenderManager::RenderView::GetPreviousSector | ( | ) | [inline, virtual] |
virtual csRenderContext* CS::RenderManager::RenderView::GetRenderContext | ( | ) | [inline, virtual] |
Get the current render context.
Implements iRenderView.
Definition at line 238 of file renderview.h.
int CS::RenderManager::RenderView::GetRenderRecursionLevel | ( | ) | const [inline] |
Get render recursion level.
Definition at line 159 of file renderview.h.
virtual iSector* CS::RenderManager::RenderView::GetThisSector | ( | ) | [inline, virtual] |
int CS::RenderManager::RenderView::GetViewHeight | ( | ) | const [inline] |
Get the height of the view rendered to.
Definition at line 258 of file renderview.h.
int CS::RenderManager::RenderView::GetViewWidth | ( | ) | const [inline] |
Get the width of the view rendered to.
Definition at line 256 of file renderview.h.
void CS::RenderManager::RenderView::InitialiseFromCamera | ( | iCamera * | camera | ) |
Initialise the RenderView from an iCamera.
void CS::RenderManager::RenderView::InitialiseFromView | ( | iView * | view | ) |
Initialise the RenderView from an iView.
bool CS::RenderManager::RenderView::IsClipperRequired | ( | ) | const [inline] |
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.
Definition at line 212 of file renderview.h.
void CS::RenderManager::RenderView::ResetFogInfo | ( | ) | [inline] |
Reset fog info.
Definition at line 235 of file renderview.h.
void CS::RenderManager::RenderView::RestoreRenderContext | ( | ) | [virtual] |
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.
void CS::RenderManager::RenderView::SetCamera | ( | iCamera * | camera | ) |
Set the camera.
void CS::RenderManager::RenderView::SetClipper | ( | iClipper2D * | clip | ) |
Set the 2D clipper for this view.
void CS::RenderManager::RenderView::SetClipPlane | ( | const csPlane3 & | p | ) | [inline] |
Set the 3D clip plane that should be used to clip all geometry.
Definition at line 184 of file renderview.h.
void CS::RenderManager::RenderView::SetCsRenderContext | ( | csRenderContext * | c | ) | [inline] |
Set the current render context (only for temporary override).
Definition at line 123 of file renderview.h.
void CS::RenderManager::RenderView::SetEngine | ( | iEngine * | engine | ) |
Set the engine.
void CS::RenderManager::RenderView::SetFirstFogInfo | ( | csFogInfo * | fi | ) | [inline] |
Set the first fog info.
Definition at line 223 of file renderview.h.
void CS::RenderManager::RenderView::SetFrustum | ( | float | lx, | |
float | rx, | |||
float | ty, | |||
float | by | |||
) |
Set the view frustum at z=1.
void CS::RenderManager::RenderView::SetLastPortal | ( | iPortal * | por | ) | [inline] |
Set the last portal.
Definition at line 168 of file renderview.h.
void CS::RenderManager::RenderView::SetMeshFilter | ( | const CS::Utility::MeshFilter & | filter | ) |
Set the mesh filter for this view.
void CS::RenderManager::RenderView::SetOriginalCamera | ( | iCamera * | camera | ) |
Set the original camera.
void CS::RenderManager::RenderView::SetPreviousSector | ( | iSector * | s | ) | [inline] |
Set the previous sector.
Definition at line 150 of file renderview.h.
void CS::RenderManager::RenderView::SetRenderRecursionLevel | ( | int | rec | ) | [inline] |
Set render recursion level.
Definition at line 163 of file renderview.h.
void CS::RenderManager::RenderView::SetThisSector | ( | iSector * | s | ) | [inline] |
Set the current sector.
Definition at line 154 of file renderview.h.
void CS::RenderManager::RenderView::SetViewDimensions | ( | int | w, | |
int | h | |||
) | [inline] |
Set the dimensions of the view rendered to.
Needed for pixel-bases computations.
Definition at line 263 of file renderview.h.
void CS::RenderManager::RenderView::UseClipFrustum | ( | bool | u | ) | [inline] |
Whether to enable clipping to the frustum.
Definition at line 180 of file renderview.h.
void CS::RenderManager::RenderView::UseClipPlane | ( | bool | u | ) | [inline] |
Whether to enable clipping to the clip plane.
Definition at line 178 of file renderview.h.
The documentation for this class was generated from the following file:
- csplugincommon/rendermanager/renderview.h
Generated for Crystal Space 2.0 by doxygen 1.6.1