1 #ifndef INCLUDE_AL_LENS_HPP
2 #define INCLUDE_AL_LENS_HPP
47 #include "al/math/al_Matrix4.hpp"
48 #include "al/math/al_Vec.hpp"
49 #include "al/spatial/al_Pose.hpp"
67 Lens(
double fovy = 30,
double nearClip = 0.1,
double farClip = 100,
94 double near()
const {
return mNear; }
95 double far()
const {
return mFar; }
97 double eyeSep()
const {
return mEyeSep; }
Lens & near(double v)
Set frustum near plane distance.
double heightAtNear() const
Returns half the height of the frustum at the near plane.
double near() const
Get frustum near plane distance.
double eyeSepAuto() const
Get automatic inter-ocular distance.
Lens & fovx(double v, double aspect)
Set horizontal field of view, in degrees.
Lens & focalLength(double v)
Set focal length.
double fovy() const
Get vertical field of view, in degrees.
Lens & far(double v)
Set frustum far plane distance.
double eyeSep() const
Get eye separation.
Lens & eyeSep(double v)
Set eye separation.
double focalLength() const
Get focal length.
static double getFovyForFovX(double fovx, double aspect)
Calculate required fovy to produce a specific fovx.
Lens(double fovy=30, double nearClip=0.1, double farClip=100, double focalLength=6, double eyeSep=0.02)
Lens & fovy(double v)
Set vertical field of view, in degrees.
static double getFovyForHeight(double height, double depth)
double heightAtDepth(double depth) const
Returns half the height of the frustum at a given depth.
double far() const
Get frustum far plane distance.