CrystalSpace

Public API Reference

iView Struct Reference

The iView class encapsulates the top-level Crystal Space renderer interface. More...

#include <ivaria/view.h>

Inheritance diagram for iView:

List of all members.

Public Member Functions

virtual void AddViewVertex (int x, int y)=0
 Add a vertex to clipping polygon (non-rectangular clipping).
virtual void ClearView ()=0
 Clear clipper in order to start building a polygon-based clipper.
virtual void Draw (iMeshWrapper *mesh=0)=0
 Draw 3D world as seen from the camera.
virtual iCameraGetCamera ()=0
 Get current camera.
virtual iClipper2DGetClipper ()=0
 Return the current clipper. This function may call UpdateClipper ().
virtual iGraphics3DGetContext ()=0
 Get Context.
virtual iCustomMatrixCameraGetCustomMatrixCamera ()=0
 Get current custom matrix camera.
virtual iEngineGetEngine ()=0
 Get engine handle.
virtual iPerspectiveCameraGetPerspectiveCamera ()=0
 Get current perspective camera.
virtual csVector2 NormalizedToScreen (const csVector2 &pos)=0
 Transform a normalized screenspace coordinate (-1 to 1) to real pixels in this viewport.
virtual void RestrictClipperToScreen ()=0
 Clip the view clipper to the screen boundaries.
virtual csVector2 ScreenToNormalized (const csVector2 &pos)=0
 Transform a screenspace coordinate in pixels to a normalized screen coordinate (-1 to 1).
virtual void SetAutoResize (bool state)=0
 Enable / Disable automatic resizing.
virtual void SetCamera (iCamera *c)=0
 Set current camera.
virtual void SetContext (iGraphics3D *ig3d)=0
 Set Context.
virtual void SetCustomMatrixCamera (iCustomMatrixCamera *c)=0
 Set current perspective camera.
virtual void SetEngine (iEngine *e)=0
 Set engine handle.
virtual void SetPerspectiveCamera (iPerspectiveCamera *c)=0
 Set current perspective camera.
virtual void SetRectangle (int x, int y, int w, int h, bool restrictToScreen=true)=0
 Set clipping rectangle.
virtual void UpdateClipper ()=0
 Update the Clipper. This is usually called from Draw.

Detailed Description

The iView class encapsulates the top-level Crystal Space renderer interface.

It is basically a camera and a clipper.

Main creators of instances implementing this interface:

Main ways to get pointers to this interface:

Main users of this interface:

Definition at line 52 of file view.h.


Member Function Documentation

virtual void iView::AddViewVertex ( int  x,
int  y 
) [pure virtual]

Add a vertex to clipping polygon (non-rectangular clipping).

Implemented in csView.

virtual void iView::ClearView (  )  [pure virtual]

Clear clipper in order to start building a polygon-based clipper.

Implemented in csView.

virtual void iView::Draw ( iMeshWrapper mesh = 0  )  [pure virtual]

Draw 3D world as seen from the camera.

If a mesh is given then only that single mesh is rendered. Note that in that case the mesh will only be rendered if it is in the same sector as the camera!

Implemented in csView.

virtual iCamera* iView::GetCamera (  )  [pure virtual]

Get current camera.

Implemented in csView.

virtual iClipper2D* iView::GetClipper (  )  [pure virtual]

Return the current clipper. This function may call UpdateClipper ().

Implemented in csView.

virtual iGraphics3D* iView::GetContext (  )  [pure virtual]

Get Context.

Implemented in csView.

virtual iCustomMatrixCamera* iView::GetCustomMatrixCamera (  )  [pure virtual]

Get current custom matrix camera.

Can return 0 if the current camera is not a custom matrix camera.

Implemented in csView.

virtual iEngine* iView::GetEngine (  )  [pure virtual]

Get engine handle.

Implemented in csView.

virtual iPerspectiveCamera* iView::GetPerspectiveCamera (  )  [pure virtual]

Get current perspective camera.

Can return 0 if the current camera is not a perspective camera.

Implemented in csView.

virtual csVector2 iView::NormalizedToScreen ( const csVector2 pos  )  [pure virtual]

Transform a normalized screenspace coordinate (-1 to 1) to real pixels in this viewport.

Implemented in csView.

virtual void iView::RestrictClipperToScreen (  )  [pure virtual]

Clip the view clipper to the screen boundaries.

Implemented in csView.

virtual csVector2 iView::ScreenToNormalized ( const csVector2 pos  )  [pure virtual]

Transform a screenspace coordinate in pixels to a normalized screen coordinate (-1 to 1).

Implemented in csView.

virtual void iView::SetAutoResize ( bool  state  )  [pure virtual]

Enable / Disable automatic resizing.

When this is true (default) then the view will detect automatically when the window size changes and adapt the view and camera automatically (i.e. it will change the view rectangle and perspective center). If you don't want that then you can disable this.

Implemented in csView.

virtual void iView::SetCamera ( iCamera c  )  [pure virtual]

Set current camera.

Implemented in csView.

virtual void iView::SetContext ( iGraphics3D ig3d  )  [pure virtual]

Set Context.

Implemented in csView.

virtual void iView::SetCustomMatrixCamera ( iCustomMatrixCamera c  )  [pure virtual]

Set current perspective camera.

Implemented in csView.

virtual void iView::SetEngine ( iEngine e  )  [pure virtual]

Set engine handle.

Implemented in csView.

virtual void iView::SetPerspectiveCamera ( iPerspectiveCamera c  )  [pure virtual]

Set current perspective camera.

Implemented in csView.

virtual void iView::SetRectangle ( int  x,
int  y,
int  w,
int  h,
bool  restrictToScreen = true 
) [pure virtual]

Set clipping rectangle.

Remarks:
The coordinates are vertically mirrored in comparison to screen space, i.e. y=0 is at the bottom of the viewport, y=GetHeight() at the top.
Parameters:
restrict Restrict the rectangle to be no bigger than the screen size.

Implemented in csView.

virtual void iView::UpdateClipper (  )  [pure virtual]

Update the Clipper. This is usually called from Draw.

Implemented in csView.


The documentation for this struct was generated from the following file:

Generated for Crystal Space 2.0 by doxygen 1.6.1