HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera Class Referenceabstract

Abstract base class for the perspective and orthographic cameras. More...

#include <RayTracer.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera:

Public Member Functions

 BaseCamera (Film &film, const Vec3R &rotation, const Vec3R &translation, double frameWidth, double nearPlane, double farPlane)
 
virtual ~BaseCamera ()
 
Film::RGBApixel (size_t i, size_t j)
 
size_t width () const
 
size_t height () const
 
void lookAt (const Vec3R &xyz, const Vec3R &up=Vec3R(0.0, 1.0, 0.0))
 
Vec3R rasterToScreen (double i, double j, double z) const
 
virtual math::Ray< double > getRay (size_t i, size_t j, double iOffset=0.5, double jOffset=0.5) const =0
 Return a Ray in world space given the pixel indices and optional offsets in the range [0, 1]. An offset of 0.5 corresponds to the center of the pixel. More...
 

Protected Member Functions

void initRay (double t0, double t1)
 

Protected Attributes

FilmmFilm
 
double mScaleWidth
 
double mScaleHeight
 
math::Ray< double > mRay
 
math::AffineMap mScreenToWorld
 

Detailed Description

Abstract base class for the perspective and orthographic cameras.

Definition at line 404 of file RayTracer.h.

Constructor & Destructor Documentation

openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera::BaseCamera ( Film film,
const Vec3R rotation,
const Vec3R translation,
double  frameWidth,
double  nearPlane,
double  farPlane 
)
inline

Definition at line 407 of file RayTracer.h.

virtual openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera::~BaseCamera ( )
inlinevirtual

Definition at line 421 of file RayTracer.h.

Member Function Documentation

virtual math::Ray<double> openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera::getRay ( size_t  i,
size_t  j,
double  iOffset = 0.5,
double  jOffset = 0.5 
) const
pure virtual

Return a Ray in world space given the pixel indices and optional offsets in the range [0, 1]. An offset of 0.5 corresponds to the center of the pixel.

Implemented in openvdb::OPENVDB_VERSION_NAME::tools::OrthographicCamera, and openvdb::OPENVDB_VERSION_NAME::tools::PerspectiveCamera.

size_t openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera::height ( void  ) const
inline

Definition at line 426 of file RayTracer.h.

void openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera::initRay ( double  t0,
double  t1 
)
inlineprotected

Definition at line 457 of file RayTracer.h.

void openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera::lookAt ( const Vec3R xyz,
const Vec3R up = Vec3R(0.0, 1.0, 0.0) 
)
inline

Rotate the camera so its negative z-axis points at xyz and its y axis is in the plane of the xyz and up vectors. In other words the camera will look at xyz and use up as the horizontal direction.

Definition at line 432 of file RayTracer.h.

Film::RGBA& openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera::pixel ( size_t  i,
size_t  j 
)
inline

Definition at line 423 of file RayTracer.h.

Vec3R openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera::rasterToScreen ( double  i,
double  j,
double  z 
) const
inline

Definition at line 444 of file RayTracer.h.

size_t openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera::width ( ) const
inline

Definition at line 425 of file RayTracer.h.

Member Data Documentation

Film* openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera::mFilm
protected

Definition at line 464 of file RayTracer.h.

math::Ray<double> openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera::mRay
protected

Definition at line 466 of file RayTracer.h.

double openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera::mScaleHeight
protected

Definition at line 465 of file RayTracer.h.

double openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera::mScaleWidth
protected

Definition at line 465 of file RayTracer.h.

math::AffineMap openvdb::OPENVDB_VERSION_NAME::tools::BaseCamera::mScreenToWorld
protected

Definition at line 467 of file RayTracer.h.


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