ScummVM API documentation
Stark::Scene Class Reference

#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
 

Detailed Description

Manager for the current game scene

Member Function Documentation

◆ scrollCamera()

void Stark::Scene::scrollCamera ( const Common::Rect viewport)

Configure rendering so that only the specified rect can be seen

◆ getProjectionMatrix()

Math::Matrix4 Stark::Scene::getProjectionMatrix ( ) const
inline

Get the projection matrix (Screen -> Camera)

◆ getViewMatrix()

Math::Matrix4 Stark::Scene::getViewMatrix ( ) const
inline

Get the projection matrix (Camera -> World)

◆ makeRayFromMouse()

Math::Ray Stark::Scene::makeRayFromMouse ( const Common::Point mouse) const

Compute a ray in world coordinates going from the camera and through the mouse

Parameters
mouseMouse position
originComputed point of origin for the ray
directionComputed direction for the ray

◆ convertPosition3DToGameScreenOriginal()

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.

◆ setFadeLevel()

void Stark::Scene::setFadeLevel ( float  fadeLevel)

Get and set scene fade level

◆ setSwayAngle()

void Stark::Scene::setSwayAngle ( const Math::Angle &  angle)

Access the sway angle the actors are currently rotated by

◆ getSwayDirection()

Math::Vector3d Stark::Scene::getSwayDirection ( ) const

Get the axis for the sway actor rotation, in world coordinates

◆ setFloatOffset()

void Stark::Scene::setFloatOffset ( float  floatOffset)

Access the float up / down current Z offset for the actors

◆ setupShadows()

void Stark::Scene::setupShadows ( bool  enabled,
float  length 
)

Access the maximum length of the horizontal light direction for casting shadows


The documentation for this class was generated from the following file: