ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Manager for the current game scene. More...

#include <scene.h>

Collaboration diagram for Stark::Scene:

List of all members.

Public Member Functions

 Scene (Gfx::Driver *gfx)
 ~Scene ()
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)
 Configure rendering so that only the specified rect can be seen.
Math::Matrix4 getProjectionMatrix () const
 Get the projection matrix (Screen -> Camera).
Math::Matrix4 getViewMatrix () const
 Get the projection matrix (Camera -> World).
Math::Ray makeRayFromMouse (const Common::Point &mouse) const
 Compute a ray in world coordinates going from the camera and through the mouse.
Common::Point convertPosition3DToGameScreenOriginal (const Math::Vector3d &obj) const
 Convert a 3D position in world coordinates into a point in 2D screen space.
void setFadeLevel (float fadeLevel)
 Get and set scene fade level.
float getFadeLevel () const
void setSwayAngle (const Math::Angle &angle)
 Access the sway angle the actors are currently rotated by.
Math::Angle getSwayAngle () const
Math::Vector3d getSwayDirection () const
 Get the axis for the the sway actor rotation, in world coordinates.
void setFloatOffset (float floatOffset)
 Access the float up / down current Z offset for the actors.
float getFloatOffset () const
void setupShadows (bool enabled, float length)
 Access the maximum length of the horizontal light direction for casting shadows.
bool shouldRenderShadows () const
float getMaxShadowLength () const

Private Member Functions

void computeClippingRect (float *xmin, float *xmax, float *ymin, float *ymax)

Private Attributes

Gfx::Driver_gfx
Math::Vector3d _cameraPosition
Math::Vector3d _cameraLookDirection
float _fov
Common::Rect _viewSize
Common::Rect _viewport
float _nearClipPlane
float _farClipPlane
Math::Matrix4 _projectionMatrix
Math::Matrix4 _viewMatrix
float _fadeLevel
Math::Angle _swayAngle
float _floatOffset
bool _shouldRenderShadows
float _maxShadowLength

Detailed Description

Manager for the current game scene.

Definition at line 42 of file scene.h.


Constructor & Destructor Documentation

Stark::Scene::Scene ( Gfx::Driver gfx  ) 

Definition at line 34 of file scene.cpp.

Stark::Scene::~Scene (  ) 

Definition at line 45 of file scene.cpp.


Member Function Documentation

void Stark::Scene::computeClippingRect ( float *  xmin,
float *  xmax,
float *  ymin,
float *  ymax 
) [private]

Definition at line 89 of file scene.cpp.

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.

Definition at line 127 of file scene.cpp.

float Stark::Scene::getFadeLevel (  )  const

Definition at line 147 of file scene.cpp.

float Stark::Scene::getFloatOffset (  )  const

Definition at line 169 of file scene.cpp.

float Stark::Scene::getMaxShadowLength (  )  const [inline]

Definition at line 93 of file scene.h.

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

Get the projection matrix (Screen -> Camera).

Definition at line 54 of file scene.h.

Math::Angle Stark::Scene::getSwayAngle (  )  const

Definition at line 155 of file scene.cpp.

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

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

Definition at line 159 of file scene.cpp.

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

Get the projection matrix (Camera -> World).

Definition at line 57 of file scene.h.

void Stark::Scene::initCamera ( const Math::Vector3d position,
const Math::Vector3d lookAt,
float  fov,
Common::Rect  viewSize,
float  nearClipPlane,
float  farClipPlane 
)

Definition at line 48 of file scene.cpp.

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:
mouse Mouse position
origin Computed point of origin for the ray
direction Computed direction for the ray

Definition at line 103 of file scene.cpp.

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

Configure rendering so that only the specified rect can be seen.

Definition at line 66 of file scene.cpp.

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

Get and set scene fade level.

Definition at line 143 of file scene.cpp.

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

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

Definition at line 165 of file scene.cpp.

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

Access the sway angle the actors are currently rotated by.

Definition at line 151 of file scene.cpp.

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

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

Definition at line 173 of file scene.cpp.

bool Stark::Scene::shouldRenderShadows (  )  const [inline]

Definition at line 92 of file scene.h.


Member Data Documentation

Definition at line 101 of file scene.h.

Definition at line 100 of file scene.h.

float Stark::Scene::_fadeLevel [private]

Definition at line 111 of file scene.h.

float Stark::Scene::_farClipPlane [private]

Definition at line 106 of file scene.h.

float Stark::Scene::_floatOffset [private]

Definition at line 113 of file scene.h.

float Stark::Scene::_fov [private]

Definition at line 102 of file scene.h.

Definition at line 98 of file scene.h.

Definition at line 116 of file scene.h.

Definition at line 105 of file scene.h.

Definition at line 108 of file scene.h.

Definition at line 115 of file scene.h.

Definition at line 112 of file scene.h.

Definition at line 109 of file scene.h.

Definition at line 104 of file scene.h.

Definition at line 103 of file scene.h.


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


Generated on Sat Nov 16 2019 05:03:35 for ResidualVM by doxygen 1.7.1
curved edge   curved edge