Blender V2.61 - r43446
|
class for render 3d scene More...
#include <KX_Dome.h>
KX_Dome::KX_Dome | ( | RAS_ICanvas * | m_canvas, |
RAS_IRasterizer * | m_rasterizer, | ||
RAS_IRenderTools * | m_rendertools, | ||
KX_KetsjiEngine * | m_engine, | ||
short | res, | ||
short | mode, | ||
short | angle, | ||
float | resbuf, | ||
short | tilt, | ||
struct Text * | warptext | ||
) |
constructor
m_rasterizer | rasterizer |
m_rendertools | render tools |
m_engine | engine |
Definition at line 45 of file KX_Dome.cpp.
References CalculateCameraOrientation(), CreateDL(), CreateFBO(), CreateGLImages(), CreateMeshDome180(), CreateMeshDome250(), CreateMeshPanorama(), cubebottom, cubefront, cubeleft, cubeleftback, cuberight, cuberightback, cubetop, dlistSupported, DOME_ENVMAP, DOME_FISHEYE, DOME_NUM_MODES, DOME_PANORAM_SPH, fboSupported, m_angle, m_mode, m_numfaces, m_numimages, MEM_freeN(), ParseWarpMesh(), SetViewPort(), txt_to_buf(), and warp.
KX_Dome::~KX_Dome | ( | void | ) | [virtual] |
destructor
Definition at line 168 of file KX_Dome.cpp.
References ClearGLImages(), dlistId, dlistSupported, fboSupported, m_numimages, and warp.
void KX_Dome::BindImages | ( | int | i | ) |
Definition at line 2006 of file KX_Dome.cpp.
References domefacesId, RAS_Rect::GetBottom(), RAS_Rect::GetLeft(), m_buffersize, and m_viewport.
Referenced by KX_KetsjiEngine::RenderDome().
void KX_Dome::CalculateCameraOrientation | ( | ) |
Definition at line 1469 of file KX_Dome.cpp.
References cos(), DOME_ENVMAP, DOME_FISHEYE, DOME_PANORAM_SPH, DOME_TRUNCATED_FRONT, DOME_TRUNCATED_REAR, i, m_angle, m_locRot, m_mode, m_tilt, MT_PI(), and sin().
Referenced by KX_Dome().
void KX_Dome::CalculateFrustum | ( | KX_Camera * | cam | ) |
Definition at line 1433 of file KX_Dome.cpp.
References RAS_FrameFrustum::camfar, RAS_FrameFrustum::camnear, KX_Camera::GetCameraFar(), KX_Camera::GetCameraNear(), RAS_IRasterizer::GetFrustumMatrix(), m_projmat, m_rasterizer, RAS_FrameFrustum::x1, RAS_FrameFrustum::x2, RAS_FrameFrustum::y1, and RAS_FrameFrustum::y2.
Referenced by RenderDomeFrame().
void KX_Dome::CalculateImageSize | ( | void | ) |
Definition at line 228 of file KX_Dome.cpp.
References canvasheight, canvaswidth, RAS_ICanvas::GetHeight(), RAS_ICanvas::GetWidth(), i, m_buffersize, m_canvas, m_imagesize, m_resbuffer, and warp.
Referenced by SetViewPort().
void KX_Dome::ClearDL | ( | void | ) |
void KX_Dome::ClearFBO | ( | void | ) |
void KX_Dome::ClearGLImages | ( | void | ) |
Definition at line 218 of file KX_Dome.cpp.
References domefacesId, and m_numimages.
Referenced by ~KX_Dome().
bool KX_Dome::CreateDL | ( | void | ) |
Definition at line 258 of file KX_Dome.cpp.
References cubebottom, cubefront, cubeleft, cubeleftback, cuberight, cuberightback, cubetop, dlistId, DOME_FISHEYE, DOME_PANORAM_SPH, DOME_TRUNCATED_FRONT, DOME_TRUNCATED_REAR, GLDrawTriangles(), GLDrawWarpQuads(), m_angle, m_mode, m_numfaces, m_numimages, nfacesbottom, nfacesfront, nfacesleft, nfacesleftback, nfacesright, nfacesrightback, nfacestop, and warp.
Referenced by KX_Dome().
bool KX_Dome::CreateFBO | ( | void | ) |
Definition at line 334 of file KX_Dome.cpp.
References domefacesId, m_numfaces, and warp.
Referenced by KX_Dome().
void KX_Dome::CreateGLImages | ( | void | ) |
Definition at line 192 of file KX_Dome.cpp.
References domefacesId, GL_CLAMP_TO_EDGE, m_imagesize, m_numfaces, m_numimages, and warp.
Referenced by KX_Dome().
void KX_Dome::CreateMeshDome180 | ( | void | ) |
Definition at line 533 of file KX_Dome.cpp.
References cubebottom, cubeleft, cuberight, cubetop, DEG2RADF, FlattenDome(), i, m_angle, m_buffersize, m_imagesize, m_radangle, m_resolution, M_SQRT2, nfacesbottom, nfacesleft, nfacesright, nfacestop, normalize(), and SplitFace().
Referenced by KX_Dome().
void KX_Dome::CreateMeshDome250 | ( | void | ) |
Definition at line 712 of file KX_Dome.cpp.
References cubebottom, cubefront, cubeleft, cuberight, cubetop, FlattenDome(), i, m_angle, m_buffersize, m_imagesize, M_PI, m_radangle, m_resolution, M_SQRT2, MT_PI(), nfacesbottom, nfacesfront, nfacesleft, nfacesright, nfacestop, normalize(), SplitFace(), and KDL::tan().
Referenced by KX_Dome().
void KX_Dome::CreateMeshPanorama | ( | void | ) |
Definition at line 996 of file KX_Dome.cpp.
References cubebottom, cubeleft, cubeleftback, cuberight, cuberightback, cubetop, FlattenPanorama(), i, m_buffersize, m_imagesize, m_resolution, M_SQRT2, nfacesbottom, nfacesleft, nfacesleftback, nfacesright, nfacesrightback, nfacestop, normalize(), and SplitFace().
Referenced by KX_Dome().
void KX_Dome::Draw | ( | void | ) |
Definition at line 1610 of file KX_Dome.cpp.
References DOME_ENVMAP, DOME_FISHEYE, DOME_PANORAM_SPH, DOME_TRUNCATED_FRONT, DOME_TRUNCATED_REAR, domefacesId, DrawDomeFisheye(), DrawDomeWarped(), DrawEnvMap(), DrawPanorama(), fboSupported, RAS_Rect::GetBottom(), RAS_ICanvas::GetHeight(), RAS_Rect::GetLeft(), RAS_ICanvas::GetWidth(), m_canvas, m_mode, m_numfaces, m_viewport, RAS_ICanvas::SetViewPort(), and warp.
Referenced by KX_KetsjiEngine::RenderDome().
void KX_Dome::DrawDomeFisheye | ( | void | ) |
Definition at line 1781 of file KX_Dome.cpp.
References cubebottom, cubefront, cubeleft, cuberight, cubetop, dlistId, dlistSupported, DOME_FISHEYE, DOME_TRUNCATED_FRONT, domefacesId, RAS_Rect::GetRight(), RAS_Rect::GetTop(), GLDrawTriangles(), i, RAS_IRasterizer::KX_WIREFRAME, m_angle, m_drawingmode, m_mode, m_numfaces, m_viewport, nfacesbottom, nfacesfront, nfacesleft, nfacesright, nfacestop, and warp.
Referenced by Draw().
void KX_Dome::DrawDomeWarped | ( | void | ) |
Definition at line 1961 of file KX_Dome.cpp.
References dlistId, dlistSupported, domefacesId, RAS_Rect::GetRight(), RAS_Rect::GetTop(), GLDrawWarpQuads(), RAS_IRasterizer::KX_WIREFRAME, m_drawingmode, m_numfaces, and m_viewport.
Referenced by Draw().
void KX_Dome::DrawEnvMap | ( | void | ) |
Definition at line 1654 of file KX_Dome.cpp.
References domefacesId, RAS_Rect::GetRight(), RAS_Rect::GetTop(), m_buffersize, m_imagesize, m_viewport, and warp.
Referenced by Draw().
void KX_Dome::DrawPanorama | ( | void | ) |
Definition at line 1877 of file KX_Dome.cpp.
References cubebottom, cubeleft, cubeleftback, cuberight, cuberightback, cubetop, dlistId, dlistSupported, domefacesId, RAS_Rect::GetRight(), RAS_Rect::GetTop(), GLDrawTriangles(), i, RAS_IRasterizer::KX_WIREFRAME, m_drawingmode, m_numfaces, m_viewport, nfacesbottom, nfacesleft, nfacesleftback, nfacesright, nfacesrightback, nfacestop, and warp.
Referenced by Draw().
void KX_Dome::FlattenDome | ( | MT_Vector3 | verts[3] | ) |
Definition at line 1318 of file KX_Dome.cpp.
References KDL::atan2(), cos(), i, m_radangle, sin(), and sqrt().
Referenced by CreateMeshDome180(), and CreateMeshDome250().
void KX_Dome::FlattenPanorama | ( | MT_Vector3 | verts[3] | ) |
Definition at line 1341 of file KX_Dome.cpp.
References KDL::atan2(), i, and MT_PI().
Referenced by CreateMeshPanorama().
int KX_Dome::GetNumberRenders | ( | ) | [inline] |
Definition at line 115 of file KX_Dome.h.
References m_numfaces.
Referenced by KX_KetsjiEngine::RenderDome().
void KX_Dome::GLDrawTriangles | ( | vector< DomeFace > & | face, |
int | nfaces | ||
) |
Definition at line 374 of file KX_Dome.cpp.
References i.
Referenced by CreateDL(), DrawDomeFisheye(), and DrawPanorama().
void KX_Dome::GLDrawWarpQuads | ( | void | ) |
Definition at line 387 of file KX_Dome.cpp.
Referenced by CreateDL(), and DrawDomeWarped().
bool KX_Dome::ParseWarpMesh | ( | STR_String | text | ) |
Definition at line 454 of file KX_Dome.cpp.
References STR_String::Explode(), i, and warp.
Referenced by KX_Dome().
void KX_Dome::RenderDome | ( | void | ) |
Definition at line 2012 of file KX_Dome.cpp.
References CalculateFrustum(), KX_Scene::CalculateVisibleMeshes(), RAS_IRasterizer::DisplayFog(), SG_Spatial::GetLocalOrientation(), KX_Camera::GetProjectionMatrix(), KX_GameObject::GetSGNode(), KX_Camera::GetWorldToCamera(), m_buffersize, m_canvas, m_locRot, m_projmat, m_rasterizer, m_rendertools, KX_GameObject::NodeGetWorldOrientation(), KX_GameObject::NodeGetWorldPosition(), KX_GameObject::NodeSetLocalOrientation(), KX_GameObject::NodeUpdateGS(), KX_Scene::RenderBuckets(), KX_Camera::SetModelviewMatrix(), KX_Camera::SetProjectionMatrix(), RAS_IRasterizer::SetProjectionMatrix(), RAS_IRasterizer::SetViewMatrix(), and RAS_ICanvas::SetViewPort().
Referenced by KX_KetsjiEngine::RenderDome().
void KX_Dome::RotateCamera | ( | KX_Camera * | cam, |
int | i | ||
) |
Definition at line 1590 of file KX_Dome.cpp.
References KX_Camera::GetCameraData(), SG_Spatial::GetLocalOrientation(), KX_GameObject::GetSGNode(), KX_Camera::GetWorldToCamera(), m_locRot, RAS_CameraData::m_perspective, m_rasterizer, KX_GameObject::NodeGetWorldOrientation(), KX_GameObject::NodeGetWorldPosition(), KX_GameObject::NodeSetLocalOrientation(), KX_GameObject::NodeUpdateGS(), KX_Camera::SetModelviewMatrix(), and RAS_IRasterizer::SetViewMatrix().
void KX_Dome::SetViewPort | ( | GLuint | viewport[4] | ) |
Definition at line 179 of file KX_Dome.cpp.
References CalculateImageSize(), canvasheight, canvaswidth, RAS_Rect::GetHeight(), RAS_Rect::GetWidth(), m_viewport, RAS_Rect::SetBottom(), RAS_Rect::SetLeft(), RAS_Rect::SetRight(), and RAS_Rect::SetTop().
Referenced by KX_Dome(), and KX_KetsjiEngine::RenderDome().
void KX_Dome::SplitFace | ( | vector< DomeFace > & | face, |
int * | nfaces | ||
) |
Definition at line 1379 of file KX_Dome.cpp.
References i.
Referenced by CreateMeshDome180(), CreateMeshDome250(), and CreateMeshPanorama().
Definition at line 156 of file KX_Dome.h.
Referenced by CalculateImageSize(), and SetViewPort().
Definition at line 155 of file KX_Dome.h.
Referenced by CalculateImageSize(), and SetViewPort().
vector<DomeFace> KX_Dome::cubeback |
vector<DomeFace> KX_Dome::cubebottom |
Definition at line 109 of file KX_Dome.h.
Referenced by CreateDL(), CreateMeshDome180(), CreateMeshDome250(), CreateMeshPanorama(), DrawDomeFisheye(), DrawPanorama(), and KX_Dome().
vector<DomeFace> KX_Dome::cubefront |
Definition at line 109 of file KX_Dome.h.
Referenced by CreateDL(), CreateMeshDome250(), DrawDomeFisheye(), and KX_Dome().
vector<DomeFace> KX_Dome::cubeleft |
Definition at line 109 of file KX_Dome.h.
Referenced by CreateDL(), CreateMeshDome180(), CreateMeshDome250(), CreateMeshPanorama(), DrawDomeFisheye(), DrawPanorama(), and KX_Dome().
vector<DomeFace> KX_Dome::cubeleftback |
Definition at line 110 of file KX_Dome.h.
Referenced by CreateDL(), CreateMeshPanorama(), DrawPanorama(), and KX_Dome().
vector<DomeFace> KX_Dome::cuberight |
Definition at line 109 of file KX_Dome.h.
Referenced by CreateDL(), CreateMeshDome180(), CreateMeshDome250(), CreateMeshPanorama(), DrawDomeFisheye(), DrawPanorama(), and KX_Dome().
vector<DomeFace> KX_Dome::cuberightback |
Definition at line 110 of file KX_Dome.h.
Referenced by CreateDL(), CreateMeshPanorama(), DrawPanorama(), and KX_Dome().
vector<DomeFace> KX_Dome::cubetop |
Definition at line 109 of file KX_Dome.h.
Referenced by CreateDL(), CreateMeshDome180(), CreateMeshDome250(), CreateMeshPanorama(), DrawDomeFisheye(), DrawPanorama(), and KX_Dome().
GLuint KX_Dome::dlistId |
Definition at line 85 of file KX_Dome.h.
Referenced by CreateDL(), DrawDomeFisheye(), DrawDomeWarped(), DrawPanorama(), and ~KX_Dome().
Definition at line 80 of file KX_Dome.h.
Referenced by DrawDomeFisheye(), DrawDomeWarped(), DrawPanorama(), KX_Dome(), and ~KX_Dome().
GLuint KX_Dome::domefacesId[7] |
Definition at line 84 of file KX_Dome.h.
Referenced by BindImages(), ClearGLImages(), CreateFBO(), CreateGLImages(), Draw(), DrawDomeFisheye(), DrawDomeWarped(), DrawEnvMap(), and DrawPanorama().
GLuint KX_Dome::fboId |
Definition at line 81 of file KX_Dome.h.
Referenced by Draw(), KX_Dome(), and ~KX_Dome().
short KX_Dome::m_angle [protected] |
Definition at line 168 of file KX_Dome.h.
Referenced by CalculateCameraOrientation(), CreateDL(), CreateMeshDome180(), CreateMeshDome250(), DrawDomeFisheye(), and KX_Dome().
int KX_Dome::m_buffersize [protected] |
Definition at line 162 of file KX_Dome.h.
Referenced by BindImages(), CalculateImageSize(), CreateMeshDome180(), CreateMeshDome250(), CreateMeshPanorama(), DrawEnvMap(), and RenderDomeFrame().
RAS_ICanvas* KX_Dome::m_canvas [protected] |
canvas
Definition at line 183 of file KX_Dome.h.
Referenced by CalculateImageSize(), Draw(), KX_KetsjiEngine::GetCanvas(), and RenderDomeFrame().
int KX_Dome::m_drawingmode [protected] |
Definition at line 159 of file KX_Dome.h.
Referenced by DrawDomeFisheye(), DrawDomeWarped(), DrawPanorama(), and KX_KetsjiEngine::GetDrawType().
KX_KetsjiEngine* KX_Dome::m_engine [protected] |
int KX_Dome::m_imagesize [protected] |
Definition at line 161 of file KX_Dome.h.
Referenced by CalculateImageSize(), CreateGLImages(), CreateMeshDome180(), CreateMeshDome250(), CreateMeshPanorama(), and DrawEnvMap().
MT_Matrix3x3 KX_Dome::m_locRot[6] [protected] |
Definition at line 177 of file KX_Dome.h.
Referenced by CalculateCameraOrientation(), RenderDomeFrame(), and RotateCamera().
short KX_Dome::m_mode [protected] |
Definition at line 167 of file KX_Dome.h.
Referenced by CalculateCameraOrientation(), CreateDL(), Draw(), DrawDomeFisheye(), and KX_Dome().
int KX_Dome::m_numfaces [protected] |
Definition at line 163 of file KX_Dome.h.
Referenced by CreateDL(), CreateFBO(), CreateGLImages(), Draw(), DrawDomeFisheye(), DrawDomeWarped(), DrawPanorama(), GetNumberRenders(), and KX_Dome().
int KX_Dome::m_numimages [protected] |
Definition at line 164 of file KX_Dome.h.
Referenced by ClearGLImages(), CreateDL(), CreateGLImages(), KX_Dome(), and ~KX_Dome().
MT_Matrix4x4 KX_Dome::m_projmat [protected] |
Definition at line 175 of file KX_Dome.h.
Referenced by CalculateFrustum(), and RenderDomeFrame().
float KX_Dome::m_radangle [protected] |
Definition at line 169 of file KX_Dome.h.
Referenced by CreateMeshDome180(), CreateMeshDome250(), and FlattenDome().
RAS_IRasterizer* KX_Dome::m_rasterizer [protected] |
rasterizer
Definition at line 185 of file KX_Dome.h.
Referenced by CalculateFrustum(), KX_KetsjiEngine::GetRasterizer(), RenderDomeFrame(), and RotateCamera().
RAS_IRenderTools* KX_Dome::m_rendertools [protected] |
render tools
Definition at line 187 of file KX_Dome.h.
Referenced by KX_KetsjiEngine::GetRenderTools(), and RenderDomeFrame().
float KX_Dome::m_resbuffer [protected] |
Definition at line 170 of file KX_Dome.h.
Referenced by CalculateImageSize().
short KX_Dome::m_resolution [protected] |
Definition at line 166 of file KX_Dome.h.
Referenced by CreateMeshDome180(), CreateMeshDome250(), and CreateMeshPanorama().
KX_Scene* KX_Dome::m_scene [protected] |
short KX_Dome::m_tilt [protected] |
Definition at line 171 of file KX_Dome.h.
Referenced by CalculateCameraOrientation().
RAS_Rect KX_Dome::m_viewport [protected] |
Definition at line 173 of file KX_Dome.h.
Referenced by BindImages(), Draw(), DrawDomeFisheye(), DrawDomeWarped(), DrawEnvMap(), DrawPanorama(), and SetViewPort().
int KX_Dome::mode |
int KX_Dome::n_width |
Definition at line 112 of file KX_Dome.h.
Referenced by CreateDL(), CreateMeshDome180(), CreateMeshDome250(), CreateMeshPanorama(), DrawDomeFisheye(), and DrawPanorama().
Definition at line 112 of file KX_Dome.h.
Referenced by CreateDL(), CreateMeshDome250(), and DrawDomeFisheye().
Definition at line 112 of file KX_Dome.h.
Referenced by CreateDL(), CreateMeshDome180(), CreateMeshDome250(), CreateMeshPanorama(), DrawDomeFisheye(), and DrawPanorama().
Definition at line 113 of file KX_Dome.h.
Referenced by CreateDL(), CreateMeshPanorama(), and DrawPanorama().
Definition at line 112 of file KX_Dome.h.
Referenced by CreateDL(), CreateMeshDome180(), CreateMeshDome250(), CreateMeshPanorama(), DrawDomeFisheye(), and DrawPanorama().
Definition at line 113 of file KX_Dome.h.
Referenced by CreateDL(), CreateMeshPanorama(), and DrawPanorama().
Definition at line 112 of file KX_Dome.h.
Referenced by CreateDL(), CreateMeshDome180(), CreateMeshDome250(), CreateMeshPanorama(), DrawDomeFisheye(), and DrawPanorama().
vector<vector <WarpMeshNode> > KX_Dome::nodes |
bool KX_Dome::usemesh |
struct { ... } KX_Dome::warp |
Referenced by CalculateImageSize(), CreateDL(), CreateFBO(), CreateGLImages(), Draw(), DrawDomeFisheye(), DrawEnvMap(), DrawPanorama(), GLDrawWarpQuads(), KX_Dome(), ParseWarpMesh(), and ~KX_Dome().