Blender V2.61 - r43446
|
#include <GPC_RenderTools.h>
Public Member Functions | |
GPC_RenderTools () | |
virtual | ~GPC_RenderTools () |
void | EndFrame (RAS_IRasterizer *rasty) |
void | BeginFrame (RAS_IRasterizer *rasty) |
void | EnableOpenGLLights (RAS_IRasterizer *rasty) |
void | DisableOpenGLLights () |
void | ProcessLighting (RAS_IRasterizer *rasty, bool uselights, const MT_Transform &viewmat) |
void | RenderText3D (int fontid, const char *text, int size, int dpi, float *color, double *mat, float aspect) |
void | RenderText2D (RAS_TEXT_RENDER_MODE mode, const char *text, int xco, int yco, int width, int height) |
void | RenderText (int mode, class RAS_IPolyMaterial *polymat, float v1[3], float v2[3], float v3[3], float v4[3], int glattrib) |
void | applyTransform (RAS_IRasterizer *rasty, double *oglmatrix, int objectdrawmode) |
int | applyLights (int objectlayer, const MT_Transform &viewmat) |
void | PushMatrix () |
void | PopMatrix () |
bool | RayHit (KX_ClientObjectInfo *client, KX_RayCast *result, void *const data) |
bool | NeedRayCast (KX_ClientObjectInfo *client) |
virtual void | MotionBlur (RAS_IRasterizer *rasterizer) |
virtual void | SetClientObject (RAS_IRasterizer *rasty, void *obj) |
Definition at line 53 of file GPC_RenderTools.h.
GPC_RenderTools::GPC_RenderTools | ( | ) |
Definition at line 66 of file GPC_RenderTools.cpp.
GPC_RenderTools::~GPC_RenderTools | ( | ) | [virtual] |
Definition at line 75 of file GPC_RenderTools.cpp.
int GPC_RenderTools::applyLights | ( | int | objectlayer, |
const MT_Transform & | viewmat | ||
) |
Definition at line 420 of file GPC_RenderTools.cpp.
References KX_LightObject::ApplyLight(), MT_Transform::getValue(), glLoadMatrixf, RAS_IRenderTools::m_auxilaryClientInfo, RAS_LightObject::m_light, and RAS_IRenderTools::m_lights.
Referenced by ProcessLighting().
void GPC_RenderTools::applyTransform | ( | RAS_IRasterizer * | rasty, |
double * | oglmatrix, | ||
int | objectdrawmode | ||
) | [virtual] |
Implements RAS_IRenderTools.
Definition at line 187 of file GPC_RenderTools.cpp.
References RAS_IPolyMaterial::BILLBOARD_AXISALIGNED, RAS_IPolyMaterial::BILLBOARD_SCREENALIGNED, MT_Vector3::cross(), MT_Vector3::dot(), RAS_IRasterizer::GetCameraPosition(), SG_Spatial::GetLocalScale(), KX_GameObject::GetParent(), KX_GameObject::GetPhysicsController(), KX_Scene::GetPhysicsEnvironment(), KX_GameObject::GetSGNode(), left(), RAS_IRenderTools::m_auxilaryClientInfo, RAS_IRenderTools::m_clientobject, MT_Vector3::normalize(), MT_Vector3::normalized(), KX_RayCast::RayTest(), CValue::Release(), RAS_IPolyMaterial::SHADOW, and size().
void GPC_RenderTools::BeginFrame | ( | RAS_IRasterizer * | rasty | ) | [virtual] |
Implements RAS_IRenderTools.
Definition at line 79 of file GPC_RenderTools.cpp.
References DisableOpenGLLights(), RAS_IRenderTools::m_clientobject, and NULL.
void GPC_RenderTools::DisableOpenGLLights | ( | ) |
Definition at line 143 of file GPC_RenderTools.cpp.
Referenced by BeginFrame(), and ProcessLighting().
void GPC_RenderTools::EnableOpenGLLights | ( | RAS_IRasterizer * | rasty | ) |
Definition at line 126 of file GPC_RenderTools.cpp.
References RAS_IRasterizer::GetCameraOrtho().
Referenced by ProcessLighting().
void GPC_RenderTools::EndFrame | ( | RAS_IRasterizer * | rasty | ) | [virtual] |
Implements RAS_IRenderTools.
Definition at line 88 of file GPC_RenderTools.cpp.
void GPC_RenderTools::MotionBlur | ( | RAS_IRasterizer * | rasterizer | ) | [virtual] |
Implements RAS_IRenderTools.
Definition at line 448 of file GPC_RenderTools.cpp.
References RAS_IRasterizer::GetMotionBlurState(), RAS_IRasterizer::GetMotionBlurValue(), RAS_IRasterizer::SetMotionBlurState(), and state.
bool GPC_RenderTools::NeedRayCast | ( | KX_ClientObjectInfo * | client | ) | [inline] |
Definition at line 102 of file GPC_RenderTools.h.
void GPC_RenderTools::PopMatrix | ( | ) | [virtual] |
Implements RAS_IRenderTools.
Definition at line 414 of file GPC_RenderTools.cpp.
void GPC_RenderTools::ProcessLighting | ( | RAS_IRasterizer * | rasty, |
bool | uselights, | ||
const MT_Transform & | viewmat | ||
) | [virtual] |
Implements RAS_IRenderTools.
Definition at line 98 of file GPC_RenderTools.cpp.
References applyLights(), DisableOpenGLLights(), EnableOpenGLLights(), RAS_IRenderTools::m_auxilaryClientInfo, and RAS_IRenderTools::m_clientobject.
void GPC_RenderTools::PushMatrix | ( | ) | [virtual] |
Implements RAS_IRenderTools.
Definition at line 409 of file GPC_RenderTools.cpp.
bool GPC_RenderTools::RayHit | ( | KX_ClientObjectInfo * | client, |
KX_RayCast * | result, | ||
void *const | data | ||
) |
Definition at line 166 of file GPC_RenderTools.cpp.
References MT_Vector3::cross(), left(), KX_RayCast::m_hitNormal, and KX_RayCast::m_hitPoint.
void GPC_RenderTools::RenderText | ( | int | mode, |
class RAS_IPolyMaterial * | polymat, | ||
float | v1[3], | ||
float | v2[3], | ||
float | v3[3], | ||
float | v4[3], | ||
int | glattrib | ||
) | [virtual] |
Implements RAS_IRenderTools.
Definition at line 384 of file GPC_RenderTools.cpp.
References RAS_IPolyMaterial::GetFlag(), KX_BlenderMaterial::GetMCol(), KX_PolygonMaterial::GetMCol(), KX_PolygonMaterial::GetMTFace(), KX_BlenderMaterial::GetMTFace(), GPU_render_text(), STR_String::Length(), RAS_IRenderTools::m_clientobject, and RAS_BLENDERMAT.
void GPC_RenderTools::RenderText2D | ( | RAS_TEXT_RENDER_MODE | mode, |
const char * | text, | ||
int | xco, | ||
int | yco, | ||
int | width, | ||
int | height | ||
) | [virtual] |
Renders 2D text string.
mode | The type of text |
text | The string to render. |
xco | Position on the screen (origin in lower left corner). |
yco | Position on the screen (origin in lower left corner). |
width | Width of the canvas to draw to. |
height | Height of the canvas to draw to. |
Implements RAS_IRenderTools.
Definition at line 316 of file GPC_RenderTools.cpp.
References BLF_draw_default(), and RAS_IRenderTools::RAS_TEXT_PADDED.
void GPC_RenderTools::RenderText3D | ( | int | fontid, |
const char * | text, | ||
int | size, | ||
int | dpi, | ||
float * | color, | ||
double * | mat, | ||
float | aspect | ||
) | [virtual] |
Renders 3D text string using BFL.
fontid | The id of the font. |
text | The string to render. |
size | The size of the text. |
dpi | The resolution of the text. |
color | The color of the object. |
mat | The Matrix of the text object. |
aspect | A scaling factor to compensate for the size. |
Implements RAS_IRenderTools.
Definition at line 286 of file GPC_RenderTools.cpp.
References BLF_ASPECT, BLF_aspect(), BLF_disable(), BLF_draw(), BLF_enable(), BLF_matrix(), BLF_MATRIX, BLF_position(), and BLF_size().
void GPC_RenderTools::SetClientObject | ( | RAS_IRasterizer * | rasty, |
void * | obj | ||
) | [virtual] |
Reimplemented from RAS_IRenderTools.
Definition at line 155 of file GPC_RenderTools.cpp.
References RAS_IRenderTools::m_clientobject, NULL, and RAS_IRasterizer::SetFrontFace().