Blender V2.61 - r43446
|
class for render 3d scene More...
#include <ImageRender.h>
Public Member Functions | |
ImageRender (KX_Scene *scene, KX_Camera *camera) | |
constructor | |
ImageRender (KX_Scene *scene, KX_GameObject *observer, KX_GameObject *mirror, RAS_IPolyMaterial *mat) | |
virtual | ~ImageRender (void) |
destructor | |
int | getBackground (int idx) |
get background color | |
void | setBackground (int red, int green, int blue, int alpha) |
set background color | |
float | getClip (void) |
clipping distance | |
void | setClip (float clip) |
set whole buffer use | |
Protected Member Functions | |
virtual void | calcImage (unsigned int texId, double ts) |
render 3d scene to image | |
void | Render () |
void | SetupRenderFrame (KX_Scene *scene, KX_Camera *cam) |
void | RenderFrame (KX_Scene *scene, KX_Camera *cam) |
void | SetBackGround (KX_WorldInfo *wi) |
void | SetWorldSettings (KX_WorldInfo *wi) |
Protected Attributes | |
bool | m_render |
true if ready to render | |
KX_Scene * | m_scene |
rendered scene | |
KX_Camera * | m_camera |
camera for render | |
bool | m_owncamera |
do we own the camera? | |
KX_GameObject * | m_observer |
for mirror operation | |
KX_GameObject * | m_mirror |
float | m_clip |
float | m_mirrorHalfWidth |
float | m_mirrorHalfHeight |
MT_Point3 | m_mirrorPos |
MT_Vector3 | m_mirrorZ |
MT_Vector3 | m_mirrorY |
MT_Vector3 | m_mirrorX |
RAS_ICanvas * | m_canvas |
canvas | |
RAS_IRasterizer * | m_rasterizer |
rasterizer | |
RAS_IRenderTools * | m_rendertools |
render tools | |
KX_KetsjiEngine * | m_engine |
engine | |
float | m_background [4] |
background color |
class for render 3d scene
Definition at line 44 of file ImageRender.h.
constructor
Definition at line 61 of file ImageRender.cpp.
References KX_KetsjiEngine::GetCanvas(), KX_KetsjiEngine::GetRasterizer(), KX_KetsjiEngine::GetRenderTools(), KX_GetActiveEngine(), m_canvas, m_engine, m_rasterizer, m_rendertools, and setBackground().
ImageRender::ImageRender | ( | KX_Scene * | scene, |
KX_GameObject * | observer, | ||
KX_GameObject * | mirror, | ||
RAS_IPolyMaterial * | mat | ||
) |
Definition at line 556 of file ImageRender.cpp.
References add_v3_v3v3(), copy_v3_v3(), MT_Vector3::cross(), cross_v3_v3v3(), dot_v3v3(), fabs(), FLT_MAX, KX_KetsjiEngine::GetCanvas(), RAS_Polygon::GetMaterial(), KX_GameObject::GetMesh(), KX_GameObject::GetMeshCount(), RAS_MeshObject::GetPolygon(), RAS_MaterialBucket::GetPolyMaterial(), KX_KetsjiEngine::GetRasterizer(), KX_KetsjiEngine::GetRenderTools(), RAS_Polygon::GetVertex(), RAS_TexVert::getXYZ(), KX_GetActiveEngine(), left(), KX_Scene::m_callbacks, m_camera, m_canvas, m_engine, m_mirrorHalfHeight, m_mirrorHalfWidth, m_mirrorPos, m_mirrorX, m_mirrorY, m_mirrorZ, m_owncamera, m_rasterizer, m_render, m_rendertools, mul_m3_v3(), mul_v3_fl(), negate_v3_v3(), normal_quad_v3(), normal_tri_v3(), normalize_v3(), RAS_MeshObject::NumPolygons(), S_OK, setBackground(), KX_GameObject::SetName(), MT_Tuple3::setValue(), sub_v3_v3v3(), THRWEXCP, transpose_m3(), and RAS_Polygon::VertexCount().
ImageRender::~ImageRender | ( | void | ) | [virtual] |
destructor
Definition at line 81 of file ImageRender.cpp.
References m_camera, m_owncamera, and CValue::Release().
void ImageRender::calcImage | ( | unsigned int | texId, |
double | ts | ||
) | [protected, virtual] |
render 3d scene to image
Reimplemented from ImageViewport.
Definition at line 99 of file ImageRender.cpp.
References RAS_ICanvas::EndFrame(), KX_Scene::GetActiveCamera(), RAS_IRasterizer::GetDrawingMode(), KX_Camera::GetViewport(), RAS_IRasterizer::KX_TEXTURED, ImageBase::m_avail, m_camera, m_canvas, m_rasterizer, m_scene, and Render().
int ImageRender::getBackground | ( | int | idx | ) | [inline] |
float ImageRender::getClip | ( | void | ) | [inline] |
void ImageRender::Render | ( | ) | [protected] |
Definition at line 117 of file ImageRender.cpp.
References RAS_IRenderTools::BeginFrame(), RAS_IRasterizer::BeginFrame(), KX_Scene::CalculateVisibleMeshes(), RAS_FrameFrustum::camfar, RAS_FrameFrustum::camnear, RAS_ICanvas::ClearBuffer(), RAS_ICanvas::ClearColor(), RAS_ICanvas::COLOR_BUFFER, RAS_FramingManager::ComputeDefaultFrustum(), RAS_FramingManager::ComputeDefaultOrtho(), RAS_ICanvas::DEPTH_BUFFER, RAS_IRasterizer::DisplayFog(), MT_Vector3::dot(), fabs(), KX_Scene::GetBlenderScene(), KX_Camera::GetCameraData(), KX_Camera::GetCameraFar(), KX_Camera::GetCameraNear(), KX_KetsjiEngine::GetClockTime(), RAS_IRasterizer::GetFrustumMatrix(), KX_Camera::GetLens(), RAS_IRasterizer::GetOrthoMatrix(), KX_Camera::GetProjectionMatrix(), KX_Camera::GetScale(), KX_Camera::GetSensorFit(), KX_Camera::GetSensorHeight(), KX_Camera::GetSensorWidth(), KX_GameObject::GetSGNode(), RAS_IRasterizer::GetStereoMode(), RAS_ICanvas::GetWindowArea(), KX_Scene::GetWorldInfo(), SG_Spatial::GetWorldOrientation(), SG_Spatial::GetWorldPosition(), SG_Spatial::GetWorldScaling(), KX_Camera::GetWorldToCamera(), KX_Camera::hasValidProjectionMatrix(), RAS_IRasterizer::KX_TEXTURED, m_background, m_camera, m_canvas, ImageViewport::m_capSize, m_clip, m_engine, m_mirror, m_mirrorHalfHeight, m_mirrorHalfWidth, m_mirrorPos, m_mirrorX, m_mirrorY, m_mirrorZ, m_observer, RAS_CameraData::m_perspective, ImageViewport::m_position, m_rasterizer, m_render, m_rendertools, m_scene, KX_GameObject::NodeGetWorldOrientation(), KX_GameObject::NodeGetWorldPosition(), Scene::r, RAS_SENSORFIT_AUTO, RAS_IRasterizer::RAS_STEREO_NOSTEREO, KX_Scene::RenderBuckets(), RAS_IRenderTools::SetAuxilaryClientInfo(), SG_Spatial::SetLocalOrientation(), SG_Spatial::SetLocalPosition(), KX_Camera::SetModelviewMatrix(), KX_Camera::SetProjectionMatrix(), RAS_IRasterizer::SetProjectionMatrix(), RAS_IRasterizer::SetStereoMode(), RAS_IRasterizer::SetViewMatrix(), RAS_ICanvas::SetViewPort(), KX_KetsjiEngine::SetWorldSettings(), SG_Node::UpdateWorldData(), RAS_FrameFrustum::x1, RAS_FrameFrustum::x2, RenderData::xasp, RenderData::xsch, RAS_FrameFrustum::y1, RAS_FrameFrustum::y2, RenderData::yasp, and RenderData::ysch.
Referenced by calcImage().
void ImageRender::SetBackGround | ( | KX_WorldInfo * | wi | ) | [protected] |
void ImageRender::setBackground | ( | int | red, |
int | green, | ||
int | blue, | ||
int | alpha | ||
) |
set background color
Definition at line 89 of file ImageRender.cpp.
References m_background.
Referenced by ImageRender(), and setBackground().
void ImageRender::setClip | ( | float | clip | ) | [inline] |
set whole buffer use
Definition at line 62 of file ImageRender.h.
References m_clip.
Referenced by setClip().
void ImageRender::SetWorldSettings | ( | KX_WorldInfo * | wi | ) | [protected] |
float ImageRender::m_background[4] [protected] |
background color
Definition at line 93 of file ImageRender.h.
Referenced by getBackground(), Render(), and setBackground().
KX_Camera* ImageRender::m_camera [protected] |
camera for render
Definition at line 70 of file ImageRender.h.
Referenced by calcImage(), ImageRender(), Render(), and ~ImageRender().
RAS_ICanvas* ImageRender::m_canvas [protected] |
canvas
Definition at line 84 of file ImageRender.h.
Referenced by calcImage(), ImageRender(), and Render().
float ImageRender::m_clip [protected] |
Definition at line 76 of file ImageRender.h.
KX_KetsjiEngine* ImageRender::m_engine [protected] |
KX_GameObject* ImageRender::m_mirror [protected] |
Definition at line 75 of file ImageRender.h.
Referenced by Render().
float ImageRender::m_mirrorHalfHeight [protected] |
Definition at line 78 of file ImageRender.h.
Referenced by ImageRender(), and Render().
float ImageRender::m_mirrorHalfWidth [protected] |
Definition at line 77 of file ImageRender.h.
Referenced by ImageRender(), and Render().
MT_Point3 ImageRender::m_mirrorPos [protected] |
Definition at line 79 of file ImageRender.h.
Referenced by ImageRender(), and Render().
MT_Vector3 ImageRender::m_mirrorX [protected] |
Definition at line 82 of file ImageRender.h.
Referenced by ImageRender(), and Render().
MT_Vector3 ImageRender::m_mirrorY [protected] |
Definition at line 81 of file ImageRender.h.
Referenced by ImageRender(), and Render().
MT_Vector3 ImageRender::m_mirrorZ [protected] |
Definition at line 80 of file ImageRender.h.
Referenced by ImageRender(), and Render().
KX_GameObject* ImageRender::m_observer [protected] |
bool ImageRender::m_owncamera [protected] |
do we own the camera?
Definition at line 72 of file ImageRender.h.
Referenced by ImageRender(), and ~ImageRender().
RAS_IRasterizer* ImageRender::m_rasterizer [protected] |
rasterizer
Definition at line 86 of file ImageRender.h.
Referenced by calcImage(), ImageRender(), and Render().
bool ImageRender::m_render [protected] |
true if ready to render
Definition at line 66 of file ImageRender.h.
Referenced by ImageRender(), and Render().
RAS_IRenderTools* ImageRender::m_rendertools [protected] |
render tools
Definition at line 88 of file ImageRender.h.
Referenced by ImageRender(), and Render().
KX_Scene* ImageRender::m_scene [protected] |
rendered scene
Definition at line 68 of file ImageRender.h.
Referenced by calcImage(), and Render().