candlewick 0.1.0
A renderer
Loading...
Searching...
No Matches
Camera.h File Reference
#include "Core.h"
#include "math_types.h"
#include <Eigen/Geometry>

Go to the source code of this file.

Classes

struct  candlewick::Camera
 The main way of using a camera to render things. More...
 

Namespaces

namespace  candlewick
 
namespace  candlewick::math
 

Enumerations

enum class  candlewick::CameraProjection { candlewick::PERSPECTIVE , candlewick::ORTHOGRAPHIC }
 

Functions

Mat3f candlewick::math::computeNormalMatrix (const Eigen::Affine3f &M)
 
Camera view-projection utilities.

These functions should be used to construct Camera objects.

Mat4f candlewick::lookAt (const Float3 &eye, const Float3 &center, const Float3 &up=Float3::UnitZ())
 
Mat4f candlewick::perspectiveMatrix (float left, float right, float bottom, float top, float near, float far)
 Compute perspective projection matrix, from clipping plane parameters (left, right, bottom, top, near, far).
 
Mat4f candlewick::perspectiveFromFov (Radf fovY, float aspectRatio, float nearZ, float farZ)
 Get perspective projection matrix given fov, aspect ratio, and clipping planes.
 
Mat4f candlewick::orthographicMatrix (const Float2 &sizes, float nearZ, float farZ)
 Compute a centered orthographic projection matrix.
 
Mat4f candlewick::orthographicMatrix (float left, float right, float bottom, float top, float near, float far)
 Compute an off-center orthographic projection matrix.
 
float candlewick::orthoProjNear (const Mat4f &proj)
 
float candlewick::orthoProjFar (const Mat4f &proj)
 
float candlewick::perspectiveProjNear (const Mat4f &proj)
 
float candlewick::perspectiveProjFar (const Mat4f &proj)
 
FrustumCornersType candlewick::frustumFromCameraProjection (const Mat4f &camProj)
 Extract the array of frustum corners, given a camera projection matrix.
 
FrustumCornersType candlewick::frustumFromCamera (const Camera &camera)
 Get the corners of a Camera's view frustum, in world space.
 
std::pair< Float3, float > candlewick::frustumBoundingSphereCenterRadius (const FrustumCornersType &worldSpaceCorners)