Euclid
Geometry Processing and Shape Analysis in C++
Euclid::Camera Class Reference

A basic positionable camera model.

#include <RenderCore.h>

Inheritance diagram for Euclid::Camera:
Euclid::RasCamera Euclid::RayCamera Euclid::OrthoRasCamera Euclid::PerspRasCamera Euclid::OrthoRayCamera Euclid::PerspRayCamera

Public Types

using Vec3 = Eigen::Vector3f
 

Public Member Functions

 Camera ()=default
 Create a Camera with default paramters.
 
 Camera (const Vec3 &position, const Vec3 &focus, const Vec3 &up, float tnear, float tfar)
 Create a Camera. More...
 
void lookat (const Vec3 &position, const Vec3 &focus, const Vec3 &up)
 Pose the camera according to the parameteres.
 
void set_range (float tnear, float tfar)
 Set the range of the ray. More...
 

Public Attributes

Eigen::Vector3f pos { 0.0f, 0.0f, 0.0f }
 Position.
 
Eigen::Vector3f u { 1.0f, 0.0f, 0.0f }
 Right vector.
 
Eigen::Vector3f v { 0.0f, 1.0f, 0.0f }
 Up vector.
 
Eigen::Vector3f dir { 0.0f, 0.0f, 1.0f }
 Negative view vector.
 
float tnear = 0.0f
 The near plane.
 
float tfar = std::numeric_limits<float>::max()
 The far plane.
 

Constructor & Destructor Documentation

Euclid::Camera::Camera ( const Vec3 &  position,
const Vec3 &  focus,
const Vec3 &  up,
float  tnear,
float  tfar 
)
inline

Pose the camera using position, focus and up.

Parameters
positionPosition.
focusFocus.
upRough up direction.
tnearThe near clipping plane.
tfarThe far clipping plane.

Member Function Documentation

void Euclid::Camera::set_range ( float  tnear,
float  tfar 
)
inline
Parameters
tnearThe near range of ray.
tfarThe far range of ray.

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