Blender V2.61 - r43446
Public Types | Public Member Functions | Protected Attributes

RAS_ICanvas Class Reference

#include <RAS_ICanvas.h>

Inheritance diagram for RAS_ICanvas:
Inheritance graph
[legend]

List of all members.

Public Types

enum  BufferType { COLOR_BUFFER = 1, DEPTH_BUFFER = 2 }
enum  RAS_MouseState { MOUSE_INVISIBLE = 1, MOUSE_WAIT, MOUSE_NORMAL }

Public Member Functions

virtual ~RAS_ICanvas ()
virtual void Init ()=0
virtual void BeginFrame ()=0
virtual void EndFrame ()=0
virtual bool BeginDraw ()=0
virtual void EndDraw ()=0
virtual void SwapBuffers ()=0
 probably needs some arguments for PS2 in future
virtual void ClearBuffer (int type)=0
virtual void ClearColor (float r, float g, float b, float a)=0
virtual int GetWidth () const =0
virtual int GetHeight () const =0
virtual int GetMouseX (int x)=0
virtual int GetMouseY (int y)=0
virtual float GetMouseNormalizedX (int x)=0
virtual float GetMouseNormalizedY (int y)=0
virtual const RAS_RectGetDisplayArea () const =0
virtual void SetDisplayArea (RAS_Rect *rect)=0
virtual RAS_RectGetWindowArea ()=0
virtual void SetViewPort (int x1, int y1, int x2, int y2)=0
virtual void SetMouseState (RAS_MouseState mousestate)=0
virtual void SetMousePosition (int x, int y)=0
virtual RAS_MouseState GetMouseState ()
virtual void MakeScreenShot (const char *filename)=0

Protected Attributes

RAS_MouseState m_mousestate

Detailed Description

2D rendering device context. The connection from 3d rendercontext to 2d surface.

Definition at line 44 of file RAS_ICanvas.h.


Member Enumeration Documentation

Enumerator:
COLOR_BUFFER 
DEPTH_BUFFER 

Definition at line 47 of file RAS_ICanvas.h.

Enumerator:
MOUSE_INVISIBLE 
MOUSE_WAIT 
MOUSE_NORMAL 

Definition at line 52 of file RAS_ICanvas.h.


Constructor & Destructor Documentation

virtual RAS_ICanvas::~RAS_ICanvas ( ) [inline, virtual]

Definition at line 60 of file RAS_ICanvas.h.


Member Function Documentation

virtual bool RAS_ICanvas::BeginDraw ( ) [pure virtual]

Initializes the canvas for drawing. Drawing to the canvas is only allowed between BeginDraw() and EndDraw().

Return values:
falseAcquiring the canvas failed.
trueAcquiring the canvas succeeded.

Implemented in KX_BlenderCanvas, and GPG_Canvas.

Referenced by KX_KetsjiEngine::BeginFrame(), KX_KetsjiEngine::Render(), and KX_KetsjiEngine::RenderDome().

virtual void RAS_ICanvas::BeginFrame ( ) [pure virtual]

Implemented in KX_BlenderCanvas, and GPC_Canvas.

Referenced by RAS_OpenGLRasterizer::BeginFrame().

virtual void RAS_ICanvas::ClearBuffer ( int  type) [pure virtual]
virtual void RAS_ICanvas::ClearColor ( float  r,
float  g,
float  b,
float  a 
) [pure virtual]
virtual void RAS_ICanvas::EndDraw ( ) [pure virtual]

Unitializes the canvas for drawing.

Implemented in KX_BlenderCanvas, and GPG_Canvas.

Referenced by KX_KetsjiEngine::EndFrame().

virtual void RAS_ICanvas::EndFrame ( ) [pure virtual]
virtual const RAS_Rect& RAS_ICanvas::GetDisplayArea ( ) const [pure virtual]
virtual int RAS_ICanvas::GetHeight ( ) const [pure virtual]
virtual float RAS_ICanvas::GetMouseNormalizedX ( int  x) [pure virtual]

Implemented in KX_BlenderCanvas, and GPG_Canvas.

virtual float RAS_ICanvas::GetMouseNormalizedY ( int  y) [pure virtual]

Implemented in KX_BlenderCanvas, and GPG_Canvas.

virtual RAS_MouseState RAS_ICanvas::GetMouseState ( ) [inline, virtual]

Definition at line 198 of file RAS_ICanvas.h.

References m_mousestate.

virtual int RAS_ICanvas::GetMouseX ( int  x) [pure virtual]

Implemented in KX_BlenderCanvas, and GPG_Canvas.

Referenced by SCA_MouseManager::NextFrame().

virtual int RAS_ICanvas::GetMouseY ( int  y) [pure virtual]

Implemented in KX_BlenderCanvas, and GPG_Canvas.

Referenced by SCA_MouseManager::NextFrame().

virtual int RAS_ICanvas::GetWidth ( ) const [pure virtual]
virtual RAS_Rect& RAS_ICanvas::GetWindowArea ( ) [pure virtual]

Used to get canvas area within blender.

Implemented in KX_BlenderCanvas, and GPC_Canvas.

Referenced by ImageRender::Render().

virtual void RAS_ICanvas::Init ( ) [pure virtual]

Implemented in KX_BlenderCanvas, and GPG_Canvas.

virtual void RAS_ICanvas::MakeScreenShot ( const char *  filename) [pure virtual]

Implemented in KX_BlenderCanvas, and GPC_Canvas.

virtual void RAS_ICanvas::SetDisplayArea ( RAS_Rect rect) [pure virtual]
virtual void RAS_ICanvas::SetMousePosition ( int  x,
int  y 
) [pure virtual]

Implemented in KX_BlenderCanvas, GPC_Canvas, and GPG_Canvas.

virtual void RAS_ICanvas::SetMouseState ( RAS_MouseState  mousestate) [pure virtual]
virtual void RAS_ICanvas::SetViewPort ( int  x1,
int  y1,
int  x2,
int  y2 
) [pure virtual]
virtual void RAS_ICanvas::SwapBuffers ( ) [pure virtual]

probably needs some arguments for PS2 in future

Implemented in KX_BlenderCanvas, and GPG_Canvas.

Referenced by RAS_OpenGLRasterizer::SwapBuffers().


Member Data Documentation


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