Fermat
Classes | Functions
CameraModule

Detailed Description

This module defines a basic camera model

Classes

struct  Camera
 
struct  CameraSampler
 

Functions

FERMAT_HOST_DEVICE void camera_frame (cugar::Vector3f eye, cugar::Vector3f lookat, cugar::Vector3f up, float hfov, float aspect_ratio, cugar::Vector3f &U, cugar::Vector3f &V, cugar::Vector3f &W)
 
FERMAT_HOST_DEVICE void camera_frame (const Camera camera, float aspect_ratio, cugar::Vector3f &U, cugar::Vector3f &V, cugar::Vector3f &W)
 
FERMAT_HOST_DEVICE cugar::Vector3f sample_camera_direction (const cugar::Vector2f ndc, const cugar::Vector3f U, const cugar::Vector3f V, const cugar::Vector3f W)
 
FERMAT_HOST_DEVICE cugar::Vector2f invert_camera_sampler (const cugar::Vector3f &U, const cugar::Vector3f &V, const cugar::Vector3f &W, const float W_len, const cugar::Vector3f out)
 
FERMAT_HOST_DEVICE float camera_direction_pdf (const cugar::Vector3f &U, const cugar::Vector3f &V, const cugar::Vector3f &W, const float W_len, const float square_focal_length, const cugar::Vector3f out, float *out_x=0, float *out_y=0)
 
FERMAT_HOST_DEVICE float camera_direction_pdf (const cugar::Vector3f &U, const cugar::Vector3f &V, const cugar::Vector3f &W, const float W_len, const float square_focal_length, const cugar::Vector3f out, bool projected=false)
 

Function Documentation

◆ camera_direction_pdf() [1/2]

FERMAT_HOST_DEVICE float camera_direction_pdf ( const cugar::Vector3f U,
const cugar::Vector3f V,
const cugar::Vector3f W,
const float  W_len,
const float  square_focal_length,
const cugar::Vector3f  out,
float *  out_x = 0,
float *  out_y = 0 
)
inline

Compute the solid angle pdf of the camera direction sampler

◆ camera_direction_pdf() [2/2]

FERMAT_HOST_DEVICE float camera_direction_pdf ( const cugar::Vector3f U,
const cugar::Vector3f V,
const cugar::Vector3f W,
const float  W_len,
const float  square_focal_length,
const cugar::Vector3f  out,
bool  projected = false 
)
inline

Compute the solid angle pdf of the camera direction sampler

◆ camera_frame() [1/2]

FERMAT_HOST_DEVICE void camera_frame ( cugar::Vector3f  eye,
cugar::Vector3f  lookat,
cugar::Vector3f  up,
float  hfov,
float  aspect_ratio,
cugar::Vector3f U,
cugar::Vector3f V,
cugar::Vector3f W 
)
inline

Compute the camera frame

◆ camera_frame() [2/2]

FERMAT_HOST_DEVICE void camera_frame ( const Camera  camera,
float  aspect_ratio,
cugar::Vector3f U,
cugar::Vector3f V,
cugar::Vector3f W 
)
inline

Compute the camera frame

◆ invert_camera_sampler()

FERMAT_HOST_DEVICE cugar::Vector2f invert_camera_sampler ( const cugar::Vector3f U,
const cugar::Vector3f V,
const cugar::Vector3f W,
const float  W_len,
const cugar::Vector3f  out 
)
inline

Invert the camera direction sampler

◆ sample_camera_direction()

FERMAT_HOST_DEVICE cugar::Vector3f sample_camera_direction ( const cugar::Vector2f  ndc,
const cugar::Vector3f  U,
const cugar::Vector3f  V,
const cugar::Vector3f  W 
)
inline

Sample a direction from the camera frame