#include <scene.h>
Public Member Functions | |
Scene (Gfx::Driver *gfx) | |
void | initCamera (const Math::Vector3d &position, const Math::Vector3d &lookAt, float fov, Common::Rect viewSize, float nearClipPlane, float farClipPlane) |
void | scrollCamera (const Common::Rect &viewport) |
Math::Matrix4 | getProjectionMatrix () const |
Math::Matrix4 | getViewMatrix () const |
Math::Ray | makeRayFromMouse (const Common::Point &mouse) const |
Common::Point | convertPosition3DToGameScreenOriginal (const Math::Vector3d &obj) const |
void | setFadeLevel (float fadeLevel) |
float | getFadeLevel () const |
void | setSwayAngle (const Math::Angle &angle) |
Math::Angle | getSwayAngle () const |
Math::Vector3d | getSwayDirection () const |
void | setFloatOffset (float floatOffset) |
float | getFloatOffset () const |
void | setupShadows (bool enabled, float length) |
bool | shouldRenderShadows () const |
float | getMaxShadowLength () const |
Manager for the current game scene
void Stark::Scene::scrollCamera | ( | const Common::Rect & | viewport | ) |
Configure rendering so that only the specified rect can be seen
|
inline |
Get the projection matrix (Screen -> Camera)
|
inline |
Get the projection matrix (Camera -> World)
Math::Ray Stark::Scene::makeRayFromMouse | ( | const Common::Point & | mouse | ) | const |
Compute a ray in world coordinates going from the camera and through the mouse
mouse | Mouse position |
origin | Computed point of origin for the ray |
direction | Computed direction for the ray |
Common::Point Stark::Scene::convertPosition3DToGameScreenOriginal | ( | const Math::Vector3d & | obj | ) | const |
Convert a 3D position in world coordinates into a point in 2D screen space
The computed 2D point is in original game view coordinates.
void Stark::Scene::setFadeLevel | ( | float | fadeLevel | ) |
Get and set scene fade level
void Stark::Scene::setSwayAngle | ( | const Math::Angle & | angle | ) |
Access the sway angle the actors are currently rotated by
Math::Vector3d Stark::Scene::getSwayDirection | ( | ) | const |
Get the axis for the sway actor rotation, in world coordinates
void Stark::Scene::setFloatOffset | ( | float | floatOffset | ) |
Access the float up / down current Z offset for the actors
void Stark::Scene::setupShadows | ( | bool | enabled, |
float | length | ||
) |
Access the maximum length of the horizontal light direction for casting shadows