Blender V2.61 - r43446
|
#include <RAS_ICanvas.h>
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_Rect & | GetDisplayArea () const =0 |
virtual void | SetDisplayArea (RAS_Rect *rect)=0 |
virtual RAS_Rect & | GetWindowArea ()=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 |
2D rendering device context. The connection from 3d rendercontext to 2d surface.
Definition at line 44 of file RAS_ICanvas.h.
Definition at line 47 of file RAS_ICanvas.h.
Definition at line 52 of file RAS_ICanvas.h.
virtual RAS_ICanvas::~RAS_ICanvas | ( | ) | [inline, virtual] |
Definition at line 60 of file RAS_ICanvas.h.
virtual bool RAS_ICanvas::BeginDraw | ( | ) | [pure virtual] |
Initializes the canvas for drawing. Drawing to the canvas is only allowed between BeginDraw() and EndDraw().
false | Acquiring the canvas failed. |
true | Acquiring 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] |
Implemented in KX_BlenderCanvas, and GPC_Canvas.
Referenced by RAS_OpenGLRasterizer::ClearColorBuffer(), RAS_OpenGLRasterizer::ClearDepthBuffer(), KX_KetsjiEngine::Render(), ImageRender::Render(), and KX_KetsjiEngine::RenderDome().
virtual void RAS_ICanvas::ClearColor | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) | [pure virtual] |
Implemented in KX_BlenderCanvas, and GPC_Canvas.
Referenced by RAS_OpenGLRasterizer::ClearColorBuffer(), KX_KetsjiEngine::Render(), ImageRender::Render(), and KX_KetsjiEngine::RenderDome().
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] |
Implemented in KX_BlenderCanvas, and GPC_Canvas.
Referenced by ImageRender::calcImage(), RAS_OpenGLRasterizer::EndFrame(), and KX_KetsjiEngine::RenderDome().
virtual const RAS_Rect& RAS_ICanvas::GetDisplayArea | ( | ) | const [pure virtual] |
Implemented in KX_BlenderCanvas, and GPC_Canvas.
Referenced by KX_KetsjiEngine::GetSceneViewport().
virtual int RAS_ICanvas::GetHeight | ( | ) | const [pure virtual] |
Implemented in KX_BlenderCanvas, and GPC_Canvas.
Referenced by BL_ConvertBlenderObjects(), BL_ConvertSensors(), KX_Dome::CalculateImageSize(), KX_Dome::Draw(), KX_KetsjiEngine::GetSceneViewport(), KX_KetsjiEngine::Render(), KX_KetsjiEngine::RenderDome(), RAS_2DFilterManager::RenderFilters(), and RAS_OpenGLRasterizer::SetRenderArea().
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] |
Implemented in KX_BlenderCanvas, and GPC_Canvas.
Referenced by BL_ConvertBlenderObjects(), BL_ConvertSensors(), KX_Dome::CalculateImageSize(), KX_Dome::Draw(), KX_KetsjiEngine::GetSceneViewport(), KX_KetsjiEngine::Render(), KX_KetsjiEngine::RenderDome(), RAS_2DFilterManager::RenderFilters(), and RAS_OpenGLRasterizer::SetRenderArea().
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] |
Implemented in KX_BlenderCanvas, and GPC_Canvas.
Referenced by RAS_OpenGLRasterizer::SetRenderArea().
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] |
Implemented in KX_BlenderCanvas, GPC_Canvas, and GPG_Canvas.
Referenced by KX_KetsjiEngine::Render(), KX_KetsjiEngine::RenderDome(), and StartKetsjiShell().
virtual void RAS_ICanvas::SetViewPort | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2 | ||
) | [pure virtual] |
Set the visible vieport
Implemented in KX_BlenderCanvas, and GPC_Canvas.
Referenced by KX_KetsjiEngine::ClearFrame(), KX_Dome::Draw(), KX_KetsjiEngine::Render(), ImageRender::Render(), KX_KetsjiEngine::RenderDome(), and KX_Dome::RenderDomeFrame().
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().
RAS_MouseState RAS_ICanvas::m_mousestate [protected] |
Definition at line 210 of file RAS_ICanvas.h.
Referenced by GetMouseState(), KX_BlenderCanvas::SetMouseState(), and GPG_Canvas::SetMouseState().