Avara3D 0.2.0
C++ API reference
a3d::PerspectiveCamera Class Reference

Camera using a perspective projection with a vertical field of view. More...

#include <a3d/visual/camera/PerspectiveCamera.h>

Inheritance diagram for a3d::PerspectiveCamera:
[legend]

Public Member Functions

 PerspectiveCamera ()
 Creates an unnamed camera with a 0.1 near plane, 1000 far plane, and 45-degree vertical FOV. More...
 
 PerspectiveCamera (float zNear, float zFar, float yFov)
 Creates an unnamed perspective camera with the supplied clipping distances and vertical FOV. More...
 
 PerspectiveCamera (const std::string &name, float zNear, float zFar, float yFov)
 Creates a named perspective camera with the supplied clipping distances and vertical FOV. More...
 
float zNear () const
 Returns the near clipping distance. More...
 
void zNear (float zNear)
 Sets the near clipping distance. More...
 
float zFar () const
 Returns the far clipping distance. More...
 
void zFar (float zFar)
 Sets the far clipping distance. More...
 
float yFov () const
 Returns the vertical field of view in radians. More...
 
void yFov (float fov)
 Sets the vertical field of view in radians. More...
 
- Public Member Functions inherited from a3d::Camera
 Camera ()
 Creates an unnamed Camera. More...
 
 Camera (const std::string &name)
 Creates a Camera with name. More...
 
const std::optional< std::string > & name () const
 Returns the optional camera name. More...
 
void name (const std::string &name)
 Sets the camera name. More...
 

Detailed Description

Camera using a perspective projection with a vertical field of view.

Definition at line 18 of file PerspectiveCamera.h.

Constructor & Destructor Documentation

◆ PerspectiveCamera() [1/3]

a3d::PerspectiveCamera::PerspectiveCamera ( )

Creates an unnamed camera with a 0.1 near plane, 1000 far plane, and 45-degree vertical FOV.

◆ PerspectiveCamera() [2/3]

a3d::PerspectiveCamera::PerspectiveCamera ( float  zNear,
float  zFar,
float  yFov 
)

Creates an unnamed perspective camera with the supplied clipping distances and vertical FOV.

◆ PerspectiveCamera() [3/3]

a3d::PerspectiveCamera::PerspectiveCamera ( const std::string &  name,
float  zNear,
float  zFar,
float  yFov 
)

Creates a named perspective camera with the supplied clipping distances and vertical FOV.

Member Function Documentation

◆ yFov() [1/2]

float a3d::PerspectiveCamera::yFov ( ) const

Returns the vertical field of view in radians.

◆ yFov() [2/2]

void a3d::PerspectiveCamera::yFov ( float  fov)

Sets the vertical field of view in radians.

◆ zFar() [1/2]

float a3d::PerspectiveCamera::zFar ( ) const

Returns the far clipping distance.

◆ zFar() [2/2]

void a3d::PerspectiveCamera::zFar ( float  zFar)

Sets the far clipping distance.

◆ zNear() [1/2]

float a3d::PerspectiveCamera::zNear ( ) const

Returns the near clipping distance.

◆ zNear() [2/2]

void a3d::PerspectiveCamera::zNear ( float  zNear)

Sets the near clipping distance.


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