3#include "structure/design_pattern/spk_contract_provider.hpp"
4#include "structure/math/spk_matrix.hpp"
5#include "structure/math/spk_vector2.hpp"
6#include "structure/math/spk_vector3.hpp"
7#include "structure/math/spk_vector4.hpp"
21 spk::ContractProvider _onProjectionEditionContractProvider;
36 void setPerspective(
float p_fovDegrees,
float p_aspectRatio,
float p_nearPlane = 0.1f,
float p_farPlane = 1000.0f);
46 void setOrthographic(
float p_left,
float p_right,
float p_bottom,
float p_top,
float p_nearPlane = 0.1f,
float p_farPlane = 1000.0f);
void setPerspective(float p_fovDegrees, float p_aspectRatio, float p_nearPlane=0.1f, float p_farPlane=1000.0f)
Sets a perspective projection.
Definition spk_camera.cpp:10
const spk::Matrix4x4 & projectionMatrix() const
Returns the projection matrix.
Definition spk_camera.cpp:26
Camera()
Builds a camera with an identity projection.
Definition spk_camera.cpp:5
const spk::Matrix4x4 & inverseProjectionMatrix() const
Returns the inverse projection matrix.
Definition spk_camera.cpp:31
spk::Vector3 convertScreenToCamera(const spk::Vector3 &p_screenPosition) const
Converts a screen position to camera space.
Definition spk_camera.cpp:36
spk::ContractProvider::Contract subscribeToProjectionEdition(const spk::ContractProvider::Job &p_job)
Subscribes to projection changes.
Definition spk_camera.cpp:47
void setOrthographic(float p_left, float p_right, float p_bottom, float p_top, float p_nearPlane=0.1f, float p_farPlane=1000.0f)
Sets an orthographic projection.
Definition spk_camera.cpp:18
static spk::IMatrix< SizeX, SizeY > identity()
Definition spk_matrix.hpp:139
typename Contract::Job Job
Definition spk_contract_provider.hpp:267