Blender V2.61 - r43446
Public Member Functions

KX_BlenderCanvas Class Reference

#include <KX_BlenderCanvas.h>

Inheritance diagram for KX_BlenderCanvas:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 KX_BlenderCanvas (struct wmWindow *win, class RAS_Rect &rect, struct ARegion *ar)
 ~KX_BlenderCanvas ()
void Init ()
void SwapBuffers ()
 probably needs some arguments for PS2 in future
void Resize (int width, int height)
void BeginFrame ()
void EndFrame ()
void ClearColor (float r, float g, float b, float a)
void ClearBuffer (int type)
int GetWidth () const
int GetHeight () const
int GetMouseX (int x)
int GetMouseY (int y)
float GetMouseNormalizedX (int x)
float GetMouseNormalizedY (int y)
const RAS_RectGetDisplayArea () const
void SetDisplayArea (RAS_Rect *rect)
RAS_RectGetWindowArea ()
void SetViewPort (int x1, int y1, int x2, int y2)
void SetMouseState (RAS_MouseState mousestate)
void SetMousePosition (int x, int y)
void MakeScreenShot (const char *filename)
bool BeginDraw ()
void EndDraw ()

Detailed Description

2D Blender device context abstraction. The connection from 3d rendercontext to 2d Blender surface embedding.

Definition at line 58 of file KX_BlenderCanvas.h.


Constructor & Destructor Documentation

KX_BlenderCanvas::KX_BlenderCanvas ( struct wmWindow win,
class RAS_Rect rect,
struct ARegion ar 
)

Definition at line 38 of file KX_BlenderCanvas.cpp.

References ARegion::winrct, rcti::xmin, and rcti::ymax.

KX_BlenderCanvas::~KX_BlenderCanvas ( )

Definition at line 47 of file KX_BlenderCanvas.cpp.


Member Function Documentation

bool KX_BlenderCanvas::BeginDraw ( ) [inline, virtual]

Nothing needs be done for BlenderCanvas Begin/End Draw, as the game engine GL context is always current/active.

Implements RAS_ICanvas.

Definition at line 177 of file KX_BlenderCanvas.h.

void KX_BlenderCanvas::BeginFrame ( ) [virtual]

Implements RAS_ICanvas.

Definition at line 62 of file KX_BlenderCanvas.cpp.

void KX_BlenderCanvas::ClearBuffer ( int  type) [virtual]

Implements RAS_ICanvas.

Definition at line 88 of file KX_BlenderCanvas.cpp.

References RAS_ICanvas::COLOR_BUFFER, and RAS_ICanvas::DEPTH_BUFFER.

void KX_BlenderCanvas::ClearColor ( float  r,
float  g,
float  b,
float  a 
) [virtual]

Implements RAS_ICanvas.

Definition at line 81 of file KX_BlenderCanvas.cpp.

void KX_BlenderCanvas::EndDraw ( ) [inline, virtual]

Unitializes the canvas for drawing.

Implements RAS_ICanvas.

Definition at line 183 of file KX_BlenderCanvas.h.

void KX_BlenderCanvas::EndFrame ( ) [virtual]

Implements RAS_ICanvas.

Definition at line 70 of file KX_BlenderCanvas.cpp.

const RAS_Rect& KX_BlenderCanvas::GetDisplayArea ( ) const [inline, virtual]

Implements RAS_ICanvas.

Definition at line 133 of file KX_BlenderCanvas.h.

int KX_BlenderCanvas::GetHeight ( ) const [virtual]

Implements RAS_ICanvas.

Definition at line 105 of file KX_BlenderCanvas.cpp.

References RAS_Rect::GetHeight().

Referenced by GetMouseNormalizedY().

float KX_BlenderCanvas::GetMouseNormalizedX ( int  x) [virtual]

Implements RAS_ICanvas.

Definition at line 122 of file KX_BlenderCanvas.cpp.

References GetMouseX(), and GetWidth().

float KX_BlenderCanvas::GetMouseNormalizedY ( int  y) [virtual]

Implements RAS_ICanvas.

Definition at line 128 of file KX_BlenderCanvas.cpp.

References GetHeight(), and GetMouseY().

int KX_BlenderCanvas::GetMouseX ( int  x) [virtual]

Implements RAS_ICanvas.

Definition at line 110 of file KX_BlenderCanvas.cpp.

References RAS_Rect::GetLeft(), GetWindowArea(), and left().

Referenced by GetMouseNormalizedX().

int KX_BlenderCanvas::GetMouseY ( int  y) [virtual]

Implements RAS_ICanvas.

Definition at line 116 of file KX_BlenderCanvas.cpp.

References RAS_Rect::GetTop(), and GetWindowArea().

Referenced by GetMouseNormalizedY().

int KX_BlenderCanvas::GetWidth ( ) const [virtual]

Implements RAS_ICanvas.

Definition at line 100 of file KX_BlenderCanvas.cpp.

References RAS_Rect::GetWidth().

Referenced by GetMouseNormalizedX().

RAS_Rect & KX_BlenderCanvas::GetWindowArea ( ) [virtual]

Used to get canvas area within blender.

Implements RAS_ICanvas.

Definition at line 136 of file KX_BlenderCanvas.cpp.

Referenced by GetMouseX(), and GetMouseY().

void KX_BlenderCanvas::Init ( void  ) [virtual]

Implements RAS_ICanvas.

Definition at line 51 of file KX_BlenderCanvas.cpp.

void KX_BlenderCanvas::MakeScreenShot ( const char *  filename) [virtual]
void KX_BlenderCanvas::Resize ( int  width,
int  height 
)
void KX_BlenderCanvas::SetDisplayArea ( RAS_Rect rect) [inline, virtual]

Implements RAS_ICanvas.

Definition at line 139 of file KX_BlenderCanvas.h.

void KX_BlenderCanvas::SetMousePosition ( int  x,
int  y 
) [virtual]
void KX_BlenderCanvas::SetMouseState ( RAS_MouseState  mousestate) [virtual]
void KX_BlenderCanvas::SetViewPort ( int  x1,
int  y1,
int  x2,
int  y2 
) [virtual]
void KX_BlenderCanvas::SwapBuffers ( ) [virtual]

probably needs some arguments for PS2 in future

Implements RAS_ICanvas.

Definition at line 57 of file KX_BlenderCanvas.cpp.

References BL_SwapBuffers().


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