CrystalSpace

Public API Reference

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

iRenderView Struct Reference
[Views & Cameras]

This interface represents all information needed to render some object in a current draw context. More...

#include <rview.h>

Inheritance diagram for iRenderView:

iBase csRenderView List of all members.

Public Methods

virtual csRenderContextGetRenderContext ()=0
 Get the current render context. More...

virtual void CreateRenderContext ()=0
 Create a new render context. More...

virtual void RestoreRenderContext (csRenderContext *original)=0
 Restore a render context. More...

virtual iCameraCreateNewCamera ()=0
 Create a new camera in the current render context. More...

virtual iEngineGetEngine ()=0
 Get the engine. More...

virtual iGraphics2DGetGraphics2D ()=0
 Get the 2D graphics subsystem. More...

virtual iGraphics3DGetGraphics3D ()=0
 Get the 3D graphics subsystem. More...

virtual void SetFrustum (float lx, float rx, float ty, float by)=0
 Set the view frustum at z=1. More...

virtual void GetFrustum (float &lx, float &rx, float &ty, float &by)=0
 Get the frustum. More...

virtual csRenderContextFrustumGetTopFrustum ()=0
 Get the top level frustum (corresponding with SetFrustum()). More...

virtual iClipper2DGetClipper ()=0
 Get the 2D clipper for this view. More...

virtual void SetClipper (iClipper2D *clip)=0
 Set the 2D clipper for this view. More...

virtual bool IsClipperRequired ()=0
 If true then we have to clip all objects to the portal frustum (returned with GetClipper()). More...

virtual bool GetClipPlane (csPlane3 &pl)=0
 Get the 3D clip plane that should be used to clip all geometry. More...

virtual csPlane3GetClipPlane ()=0
 Get the clip plane. More...

virtual void SetClipPlane (const csPlane3 &pl)=0
 Set the 3D clip plane that should be used to clip all geometry. More...

virtual void UseClipPlane (bool u)=0
 Enable the use of a clip plane. More...

virtual void UseClipFrustum (bool u)=0
 Enable the use of a clip frustum. More...

virtual csFogInfoGetFirstFogInfo ()=0
 Every fogged sector we encountered results in an extra structure in the following list. More...

virtual void SetFirstFogInfo (csFogInfo *fi)=0
 Set the first fog info. More...

virtual bool AddedFogInfo ()=0
 Return true if fog info has been added. More...

virtual void ResetFogInfo ()=0
 Reset fog info. More...

virtual iCameraGetCamera ()=0
 Get the current camera. More...

virtual void CalculateFogPolygon (G3DPolygonDP &poly)=0
 Calculate the fog information in the given G3DPolygonDP structure. More...

virtual void CalculateFogPolygon (G3DPolygonDPFX &poly)=0
 Calculate the fog information in the given G3DPolygonDPFX structure. More...

virtual void CalculateFogMesh (const csTransform &tr_o2c, G3DTriangleMesh &mesh)=0
 Calculate the fog information in the given G3DTriangleMesh structure. More...

virtual void CalculateFogMesh (const csTransform &tr_o2c, G3DPolygonMesh &mesh)=0
 Calculate the fog information in the given G3DPolygonMesh structure. More...

virtual bool TestBSphere (const csReversibleTransform &o2c, const csSphere &sphere)=0
 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)=0
 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)=0
 Check if the screen bounding box of an object is visible in this render view. More...

virtual iSectorGetThisSector ()=0
 Get current sector. More...

virtual void SetThisSector (iSector *s)=0
 Set the current sector. More...

virtual iSectorGetPreviousSector ()=0
 Get previous sector. More...

virtual void SetPreviousSector (iSector *s)=0
 Set the previous sector. More...

virtual iPolygon3DGetPortalPolygon ()=0
 Get the portal polygon. More...

virtual void SetPortalPolygon (iPolygon3D *poly)=0
 Set the portal polygon. More...

virtual int GetRenderRecursionLevel ()=0
 Get render recursion level. More...

virtual void SetRenderRecursionLevel (int rec)=0
 Set render recursion level. More...

virtual void AttachRenderContextData (void *key, iBase *data)=0
 Attach data to the current render context. More...

virtual iBaseFindRenderContextData (void *key)=0
 Look for data on the current render context. More...

virtual void DeleteRenderContextData (void *key)=0
 Delete all data with the given key on the current render context. More...

virtual iCameraGetOriginalCamera () const=0
 Get the original camera for this render view. More...


Detailed Description

This interface represents all information needed to render some object in a current draw context.

Definition at line 205 of file iengine/rview.h.


Member Function Documentation

virtual bool iRenderView::AddedFogInfo   [pure virtual]
 

Return true if fog info has been added.

Implemented in csRenderView.

virtual void iRenderView::AttachRenderContextData void *    key,
iBase   data
[pure virtual]
 

Attach data to the current render context.

Implemented in csRenderView.

virtual void iRenderView::CalculateFogMesh const csTransform   tr_o2c,
G3DPolygonMesh   mesh
[pure virtual]
 

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.

Implemented in csRenderView.

virtual void iRenderView::CalculateFogMesh const csTransform   tr_o2c,
G3DTriangleMesh   mesh
[pure virtual]
 

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.

Implemented in csRenderView.

virtual void iRenderView::CalculateFogPolygon G3DPolygonDPFX   poly [pure virtual]
 

Calculate the fog information in the given G3DPolygonDPFX structure.

Implemented in csRenderView.

virtual void iRenderView::CalculateFogPolygon G3DPolygonDP   poly [pure virtual]
 

Calculate the fog information in the given G3DPolygonDP structure.

Implemented in csRenderView.

virtual bool iRenderView::ClipBBox const csBox2   sbox,
const csBox3   cbox,
int &    clip_portal,
int &    clip_plane,
int &    clip_z_plane
[pure virtual]
 

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.

Implemented in csRenderView.

virtual bool iRenderView::ClipBSphere const csReversibleTransform   o2c,
const csSphere   sphere,
int &    clip_portal,
int &    clip_plane,
int &    clip_z_plane
[pure virtual]
 

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.

Implemented in csRenderView.

virtual iCamera* iRenderView::CreateNewCamera   [pure virtual]
 

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.

Implemented in csRenderView.

virtual void iRenderView::CreateRenderContext   [pure 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).

Implemented in csRenderView.

virtual void iRenderView::DeleteRenderContextData void *    key [pure virtual]
 

Delete all data with the given key on the current render context.

Implemented in csRenderView.

virtual iBase* iRenderView::FindRenderContextData void *    key [pure virtual]
 

Look for data on the current render context.

Implemented in csRenderView.

virtual iCamera* iRenderView::GetCamera   [pure virtual]
 

Get the current camera.

Implemented in csRenderView.

virtual iClipper2D* iRenderView::GetClipper   [pure virtual]
 

Get the 2D clipper for this view.

Implemented in csRenderView.

virtual csPlane3& iRenderView::GetClipPlane   [pure virtual]
 

Get the clip plane.

Implemented in csRenderView.

virtual bool iRenderView::GetClipPlane csPlane3   pl [pure virtual]
 

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.

Implemented in csRenderView.

virtual iEngine* iRenderView::GetEngine   [pure virtual]
 

Get the engine.

Implemented in csRenderView.

virtual csFogInfo* iRenderView::GetFirstFogInfo   [pure virtual]
 

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.

Implemented in csRenderView.

virtual void iRenderView::GetFrustum float &    lx,
float &    rx,
float &    ty,
float &    by
[pure virtual]
 

Get the frustum.

Implemented in csRenderView.

virtual iGraphics2D* iRenderView::GetGraphics2D   [pure virtual]
 

Get the 2D graphics subsystem.

Implemented in csRenderView.

virtual iGraphics3D* iRenderView::GetGraphics3D   [pure virtual]
 

Get the 3D graphics subsystem.

Implemented in csRenderView.

virtual iCamera* iRenderView::GetOriginalCamera   const [pure virtual]
 

Get the original camera for this render view.

This is the camera before any space warping portals.

Implemented in csRenderView.

virtual iPolygon3D* iRenderView::GetPortalPolygon   [pure virtual]
 

Get the portal polygon.

Implemented in csRenderView.

virtual iSector* iRenderView::GetPreviousSector   [pure virtual]
 

Get previous sector.

Implemented in csRenderView.

virtual csRenderContext* iRenderView::GetRenderContext   [pure virtual]
 

Get the current render context.

Implemented in csRenderView.

virtual int iRenderView::GetRenderRecursionLevel   [pure virtual]
 

Get render recursion level.

Implemented in csRenderView.

virtual iSector* iRenderView::GetThisSector   [pure virtual]
 

Get current sector.

Implemented in csRenderView.

virtual csRenderContextFrustum* iRenderView::GetTopFrustum   [pure virtual]
 

Get the top level frustum (corresponding with SetFrustum()).

Implemented in csRenderView.

virtual bool iRenderView::IsClipperRequired   [pure virtual]
 

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.

Implemented in csRenderView.

virtual void iRenderView::ResetFogInfo   [pure virtual]
 

Reset fog info.

Implemented in csRenderView.

virtual void iRenderView::RestoreRenderContext csRenderContext   original [pure 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.

Implemented in csRenderView.

virtual void iRenderView::SetClipper iClipper2D   clip [pure virtual]
 

Set the 2D clipper for this view.

Implemented in csRenderView.

virtual void iRenderView::SetClipPlane const csPlane3   pl [pure virtual]
 

Set the 3D clip plane that should be used to clip all geometry.

Implemented in csRenderView.

virtual void iRenderView::SetFirstFogInfo csFogInfo   fi [pure virtual]
 

Set the first fog info.

Implemented in csRenderView.

virtual void iRenderView::SetFrustum float    lx,
float    rx,
float    ty,
float    by
[pure virtual]
 

Set the view frustum at z=1.

Implemented in csRenderView.

virtual void iRenderView::SetPortalPolygon iPolygon3D   poly [pure virtual]
 

Set the portal polygon.

Implemented in csRenderView.

virtual void iRenderView::SetPreviousSector iSector   s [pure virtual]
 

Set the previous sector.

Implemented in csRenderView.

virtual void iRenderView::SetRenderRecursionLevel int    rec [pure virtual]
 

Set render recursion level.

Implemented in csRenderView.

virtual void iRenderView::SetThisSector iSector   s [pure virtual]
 

Set the current sector.

Implemented in csRenderView.

virtual bool iRenderView::TestBSphere const csReversibleTransform   o2c,
const csSphere   sphere
[pure virtual]
 

Test if the given bounding sphere (in object space coordinates) is visibile in this render view.

The optional will transform object to camera space.

Implemented in csRenderView.

virtual void iRenderView::UseClipFrustum bool    u [pure virtual]
 

Enable the use of a clip frustum.

Implemented in csRenderView.

virtual void iRenderView::UseClipPlane bool    u [pure virtual]
 

Enable the use of a clip plane.

Implemented in csRenderView.


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