Factory object that can create new PerspectiveCamera instances.
More...
#include <luciad/cameras/PerspectiveCamera.h>
Factory object that can create new PerspectiveCamera instances.
◆ Builder() [1/2]
luciad::PerspectiveCamera::Builder::Builder |
( |
const Builder & |
other | ) |
|
◆ Builder() [2/2]
luciad::PerspectiveCamera::Builder::Builder |
( |
Builder && |
other | ) |
|
|
noexcept |
◆ ~Builder()
luciad::PerspectiveCamera::Builder::~Builder |
( |
| ) |
|
◆ build()
std::shared_ptr< PerspectiveCamera > luciad::PerspectiveCamera::Builder::build |
( |
| ) |
const |
Returns a new perspective camera.
- Returns
- a new perspective camera.
◆ eye()
Sets the eye the position of the new camera.
- Parameters
-
eye | the position of the new camera. |
- Returns
- this builder
◆ fovY()
Builder & luciad::PerspectiveCamera::Builder::fovY |
( |
Angle |
fovY | ) |
|
Sets the vertical field of view.
- Note
- The horizontal field of view will be derived from vertical field of view based on the aspect ratio. You can convert between horizontal and vertical field-of-view angles using the following formulae:
double aspectRatio = static_cast<double>(camera->getWidth()) / camera->getHeight();
Angle cameraFovX =
Angle::fromRadians(2.0 * std::atan(std::tan(camera->getFovY().getRadians() / 2.0) * aspectRatio));
An angle on a mathematical circle: degrees, counter-clockwise from right/X-axis.
Definition: Angle.h:14
double getRadians() const
Returns the value in radians constrained between [0, 2*PI]
static Angle fromRadians(double radians)
Creates an Angle from an angle value in radians.
- Parameters
-
fovY | the new vertical field of view. |
- Returns
- this builder
◆ look()
Builder & luciad::PerspectiveCamera::Builder::look |
( |
const Look & |
look | ) |
|
Sets the position and orientation of the new camera.
- Parameters
-
look | the position and orientation of the new camera. |
- Returns
- this builder
◆ lookAt()
Builder & luciad::PerspectiveCamera::Builder::lookAt |
( |
const LookAt & |
lookAt | ) |
|
Sets the description of what the camera is looking at and the orientation of the camera.
- Parameters
-
lookAt | the description of what the camera is looking at and the orientation of the camera. |
- Returns
- this builder
◆ lookFrom()
Builder & luciad::PerspectiveCamera::Builder::lookFrom |
( |
const LookFrom & |
lookFrom | ) |
|
Sets the description of the position and orientation of the new camera.
- Parameters
-
lookFrom | the description of the position and orientation of the new camera. |
- Returns
- this builder
◆ operator=()
Builder & luciad::PerspectiveCamera::Builder::operator= |
( |
Builder |
other | ) |
|
|
noexcept |
◆ orientation()
Sets the forward the viewing direction of the new camera and the camera's up direction.
- Parameters
-
forward | the viewing direction of the new camera |
up | the camera's up direction |
- Returns
- this builder