OpenVDB 11.0.0

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OrthographicCamera Class Reference

`#include <openvdb/tools/RayTracer.h>`

Inheritance diagram for OrthographicCamera:

## Public Member Functions
| OrthographicCamera (Film &film, const Vec3R &rotation=Vec3R(0.0), const Vec3R &translation=Vec3R(0.0), double frameWidth=1.0, double nearPlane=1e-3, double farPlane=std::numeric_limits< double >::max())
| Constructor.
| ~OrthographicCamera () override=default
math::Ray< double > | getRay (size_t i, size_t j, double iOffset=0.5, double jOffset=0.5) const override
| 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.
Film::RGBA & | pixel (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

## Protected Member Functions
void | initRay (double t0, double t1)

## Protected Attributes
Film * | mFilm
double | mScaleWidth
double | mScaleHeight
math::Ray< double > | mRay
math::AffineMap | mScreenToWorld

## Constructor & Destructor Documentation

## ◆ OrthographicCamera()

OrthographicCamera | ( | Film & | film,
|  | const Vec3R & | rotation = `Vec3R(0.0)`,
|  | const Vec3R & | translation = `Vec3R(0.0)`,
|  | double | frameWidth = `1.0`,
|  | double | nearPlane = `1e-3`,
|  | double | farPlane = `std::numeric_limits<double>::max()`
| ) |  |
| inline

Constructor.

Parameters

  film | film (i.e. image) defining the pixel resolution
  rotation | rotation in degrees of the camera in world space (applied in x, y, z order)
  translation | translation of the camera in world-space units, applied after rotation
  frameWidth | width in of the frame in world-space units
  nearPlane | depth of the near clipping plane in world-space units
  farPlane | depth of the far clipping plane in world-space units

If no rotation or translation is provided, the camera is placed at (0,0,0) in world space and points in the direction of the negative z axis.

## ◆ ~OrthographicCamera()

~OrthographicCamera | ( |  | ) |
| override default

## Member Function Documentation

## ◆ getRay()

math::Ray< double > getRay | ( | size_t | i,
|  | size_t | j,
|  | double | iOffset = `0.5`,
|  | double | jOffset = `0.5`
| ) |  | const
| inline override 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.

Implements BaseCamera.

## ◆ height()

size_t height | ( |  | ) | const
| inline inherited

## ◆ initRay()

void initRay | ( | double | t0,
|  | double | t1
| ) |  |
| inline protected inherited

## ◆ lookAt()

void lookAt | ( | const Vec3R & | xyz,
|  | const Vec3R & | up = `Vec3R(0.0, 1.0, 0.0)`
| ) |  |
| inline inherited

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.

## ◆ pixel()

Film::RGBA & pixel | ( | size_t | i,
|  | size_t | j
| ) |  |
| inline inherited

## ◆ rasterToScreen()

Vec3R rasterToScreen | ( | double | i,
|  | double | j,
|  | double | z
| ) |  | const
| inline inherited

## ◆ width()

size_t width | ( |  | ) | const
| inline inherited

## Member Data Documentation

## ◆ mFilm

Film* mFilm
| protected inherited

## ◆ mRay

math::Ray<double> mRay
| protected inherited

## ◆ mScaleHeight

double mScaleHeight
| protected inherited

## ◆ mScaleWidth

double mScaleWidth
| protected inherited

## ◆ mScreenToWorld

math::AffineMap mScreenToWorld
| protected inherited