Blender V2.61 - r43446
|
#include <RAS_FramingManager.h>
Static Public Member Functions | |
static void | ComputeViewport (const RAS_FrameSettings &settings, const RAS_Rect &availableViewport, RAS_Rect &viewport) |
static void | ComputeOrtho (const RAS_FrameSettings &settings, const RAS_Rect &availableViewport, const RAS_Rect &viewport, const float scale, const float camnear, const float camfar, const short sensor_fit, RAS_FrameFrustum &frustum) |
static void | ComputeFrustum (const RAS_FrameSettings &settings, const RAS_Rect &availableViewport, const RAS_Rect &viewport, const float lens, const float sensor_x, const float sensor_y, const short sensor_fit, const float camnear, const float camfar, RAS_FrameFrustum &frustum) |
static void | ComputeDefaultFrustum (const float camnear, const float camfar, const float lens, const float sensor_x, const float sensor_y, const short sensor_fit, const float design_aspect_ratio, RAS_FrameFrustum &frustum) |
static void | ComputeDefaultOrtho (const float camnear, const float camfar, const float scale, const float design_aspect_ratio, const short sensor_fit, RAS_FrameFrustum &frustum) |
This class helps to compute a view frustum and a viewport rectangle given the above settings and a description of the current canvas dimensions.
You do not have to instantiate this class directly, it only contains static helper functions
Definition at line 206 of file RAS_FramingManager.h.
void RAS_FramingManager::ComputeDefaultFrustum | ( | const float | camnear, |
const float | camfar, | ||
const float | lens, | ||
const float | sensor_x, | ||
const float | sensor_y, | ||
const short | sensor_fit, | ||
const float | design_aspect_ratio, | ||
RAS_FrameFrustum & | frustum | ||
) | [static] |
Definition at line 38 of file RAS_FramingManager.cpp.
References RAS_FrameFrustum::camfar, RAS_FrameFrustum::camnear, RAS_SENSORFIT_AUTO, RAS_SENSORFIT_HOR, RAS_FrameFrustum::x1, RAS_FrameFrustum::x2, RAS_FrameFrustum::y1, and RAS_FrameFrustum::y2.
Referenced by ComputeFrustum(), and ImageRender::Render().
void RAS_FramingManager::ComputeDefaultOrtho | ( | const float | camnear, |
const float | camfar, | ||
const float | scale, | ||
const float | design_aspect_ratio, | ||
const short | sensor_fit, | ||
RAS_FrameFrustum & | frustum | ||
) | [static] |
Definition at line 85 of file RAS_FramingManager.cpp.
References RAS_FrameFrustum::camfar, RAS_FrameFrustum::camnear, RAS_SENSORFIT_AUTO, RAS_SENSORFIT_HOR, RAS_FrameFrustum::x1, RAS_FrameFrustum::x2, RAS_FrameFrustum::y1, and RAS_FrameFrustum::y2.
Referenced by ComputeOrtho(), and ImageRender::Render().
void RAS_FramingManager::ComputeFrustum | ( | const RAS_FrameSettings & | settings, |
const RAS_Rect & | availableViewport, | ||
const RAS_Rect & | viewport, | ||
const float | lens, | ||
const float | sensor_x, | ||
const float | sensor_y, | ||
const short | sensor_fit, | ||
const float | camnear, | ||
const float | camfar, | ||
RAS_FrameFrustum & | frustum | ||
) | [static] |
Definition at line 218 of file RAS_FramingManager.cpp.
References ComputeDefaultFrustum(), RAS_FrameSettings::DesignAspectHeight(), RAS_FrameSettings::DesignAspectWidth(), RAS_FrameSettings::e_frame_bars, RAS_FrameSettings::e_frame_extend, RAS_FrameSettings::e_frame_scale, RAS_FrameSettings::FrameType(), RAS_Rect::GetHeight(), RAS_Rect::GetWidth(), RAS_FrameFrustum::x1, RAS_FrameFrustum::x2, RAS_FrameFrustum::y1, and RAS_FrameFrustum::y2.
void RAS_FramingManager::ComputeOrtho | ( | const RAS_FrameSettings & | settings, |
const RAS_Rect & | availableViewport, | ||
const RAS_Rect & | viewport, | ||
const float | scale, | ||
const float | camnear, | ||
const float | camfar, | ||
const short | sensor_fit, | ||
RAS_FrameFrustum & | frustum | ||
) | [static] |
compute a frustrum given a valid viewport, RAS_FrameSettings, canvas description and camera description
Definition at line 290 of file RAS_FramingManager.cpp.
References ComputeDefaultOrtho(), RAS_FrameSettings::DesignAspectHeight(), RAS_FrameSettings::DesignAspectWidth(), RAS_FrameSettings::e_frame_bars, RAS_FrameSettings::e_frame_extend, RAS_FrameSettings::e_frame_scale, RAS_FrameSettings::FrameType(), RAS_Rect::GetHeight(), RAS_Rect::GetWidth(), RAS_FrameFrustum::x1, RAS_FrameFrustum::x2, RAS_FrameFrustum::y1, and RAS_FrameFrustum::y2.
void RAS_FramingManager::ComputeViewport | ( | const RAS_FrameSettings & | settings, |
const RAS_Rect & | availableViewport, | ||
RAS_Rect & | viewport | ||
) | [static] |
Compute a viewport given a RAS_FrameSettings and a description of the canvas.
Definition at line 164 of file RAS_FramingManager.cpp.
References RAS_FrameSettings::DesignAspectHeight(), RAS_FrameSettings::DesignAspectWidth(), RAS_FrameSettings::e_frame_bars, RAS_FrameSettings::e_frame_extend, RAS_FrameSettings::e_frame_scale, RAS_FrameSettings::FrameType(), RAS_Rect::GetBottom(), RAS_Rect::GetHeight(), RAS_Rect::GetLeft(), RAS_Rect::GetWidth(), RAS_Rect::SetBottom(), RAS_Rect::SetLeft(), RAS_Rect::SetRight(), and RAS_Rect::SetTop().
Referenced by KX_KetsjiEngine::GetSceneViewport().