|
| | Scene ()=default |
| | Size of an ground grid cell. More...
|
| |
|
| Scene (int32_t x, int32_t y, int32_t width, int32_t height) |
| | Creates a scene and initializes viewport to the specified values.
|
| |
|
| Scene (const Scene &)=delete |
| |
| glm::vec3 | MoveInProjectionSpace (const glm::vec3 &point, const glm::vec2 &proj_move_origin, const glm::vec2 &proj_move_end) |
| | For a 3D point, transfers screen movement into world, in parallel to camera projection plane. More...
|
| |
|
hiro::draw::VisualCamera * | GetCamera () |
| | Returns camera object.
|
| |
|
uint32_t | GetInstanceCount () |
| | Returns number of instances added to the scene.
|
| |
| int32_t | AddInstance (const hiro::draw::PRenderer object, const hiro::draw::PStyle style, const uint8_t layer=0) |
| | Adds new instance to the scene. More...
|
| |
|
void | RemoveInstance (int32_t index) |
| | Removes instance by its index.
|
| |
|
void | ClearInstances () |
| | Removes all instances.
|
| |
|
void | AddLight (const uint32_t &light) |
| | Add index of renderer light into scene, which should influence rendered objects.
|
| |
|
void | SetLights (const std::vector< uint32_t > &lights) |
| | Set indices of renderer lights into scene, which should influence rendered objects.
|
| |
|
void | SetProjectionPersp (float fov, float near_plane=0.01f, float far_plane=1000.0f) |
| | Setup scene projection matrix into perspective projection.
|
| |
|
void | SetProjectionOrtho (float sizing, float near_plane=0.01f, float far_plane=1000.0f) |
| | Setup scene projection matrix into orthographic projection.
|
| |
|
void | SetProjectionCustom (const glm::mat4 &proj_matrix) |
| | Setup scene projection matrix into orthographic projection.
|
| |
|
void | SetProjectionCameraParams (const glm::uvec2 &resolution, float fx, float fy, float cx, float cy, float near_plane=0.01f, float far_plane=1000.0f) |
| | Setup scene projection matrix based on camera intrinsic parameters.
|
| |
|
void | SetProjMatrix (const glm::mat4 &proj_mat) |
| | Set scene projection matrix to custom matrix.
|
| |
|
const glm_ext::TransMat4 & | GetProjectionMat () const |
| | Returns current projection matrix of a scene.
|
| |
|
glm_ext::TransMat4 | GetViewProjMat () const |
| | Returns current view and projection matrix of a scene.
|
| |
|
glm_ext::TransMat4 | GetViewMat () const |
| | Returns current view matrix of a scene.
|
| |
|
void | SetViewport (int32_t x, int32_t y, int32_t width, int32_t height) |
| | Sets up rendering viewport for a scene.
|
| |
|
const geom::IRect & | GetViewport () const |
| | Returns rendering viewport for a scene.
|
| |
|
float | GetNearDistance () const |
| | Returns near plane distance.
|
| |
|
float | GetFarDistance () const |
| | Returns far plane distance.
|
| |
|
float | GetFovX () const |
| | Returns the camera's field of view angle in x (camera right) direction.
|
| |
|
float | GetFovY () const |
| | Returns the camera's field of view angle in y (camera up) direction.
|
| |
|
float | GetAspectRatio () const |
| | Compute the camera's aspect ratio (w/h);.
|
| |
|
ProjectionParams | GetProjectionParams () const |
| | Returns projection parameters of this scene.
|
| |
Defines rendering viewport, contains multiple object instances and a camera.
A scene represents single viewport and can hold multiple pointers to object instances with accoring styles, to be rendered in hiro::draw::Renderer. Additionally, it contains internal hiro::draw::Camera object and projection matrix.