13 using std::unique_ptr;
void setFrustumMode(FrustumMode frustumMode)
Set frustum mode.
Matrix4x4 projectionMatrix
FrustumMode getFrustumMode() const
const Matrix4x4 & getModelViewProjectionMatrix() const
static STATIC_DLL_IMPEXT Vector3 defaultUp
void setSideVector(const Vector3 &sideVector)
Set side vector.
const Matrix4x4 & getModelViewProjectionInvertedMatrix() const
float getOrthographicFrustumScale() const
const Vector3 & getLookAt() const
void update(int contextIdx, int32_t width, int32_t height)
Sets up camera while resizing the view port.
Camera(Renderer *renderer)
Public constructor.
Matrix4x4 mvpInvertedMatrix
void setFovX(float fovX)
Set field of view X.
const Matrix4x4 & getCameraMatrix() const
const Vector3 & getSideVector() const
const Matrix4x4 & getProjectionMatrix() const
void setUpVector(const Vector3 &upVector)
Set up vector.
Matrix4x4 & computeModelViewMatrix()
Computes projection matrix for given look from, look at and up vector.
unique_ptr< Frustum > frustum
void setCameraMode(CameraMode cameraMode)
Set camera mode.
void setLookFrom(const Vector3 &lookFrom)
Set look from.
void setOrthographicFrustumScale(float orthographicFrustumScale)
Set orthographic frustum scale.
CameraMode getCameraMode() const
void setForwardVector(const Vector3 &forwardVector)
Set forward vector.
static Vector3 computeUpVector(const Vector3 &lookFrom, const Vector3 &lookAt)
Computes the up vector for given look from and look at vectors.
const Vector3 & getLookFrom() const
void setZNear(float zNear)
Set z near.
float orthographicFrustumScale
@ FRUSTUMMODE_PERSPECTIVE
@ FRUSTUMMODE_ORTHOGRAPHIC
Matrix4x4 & computeProjectionMatrix()
Computes the projection matrix.
void setLookAt(const Vector3 &lookAt)
Set look at.
void setZFar(float zFar)
Set z far.
const Vector3 & getForwardVector() const
const Vector3 & getUpVector() const
Matrix4x4 class representing matrix4x4 mathematical structure and operations for 3d space.
Vector3 class representing vector3 mathematical structure and operations with x, y,...
#define STATIC_DLL_IMPEXT
#define FORBID_CLASS_COPY(CLASS)