Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::SkewedPerspectiveCamera Class Referencefinal

Camera with off axis perspective projection. More...

#include <inviwo/core/datastructures/camera/skewedperspectivecamera.h>

Inheritance diagram for inviwo::SkewedPerspectiveCamera:

Public Member Functions

virtual SkewedPerspectiveCamera * clone () const override
virtual void configureProperties (CameraProperty &cameraProperty, bool attach) override
virtual void deserialize (Deserializer &d) override
virtual std::string_view getClassIdentifier () const override
double getFovy () const
const dvec2 & getOffset () const
SkewedPerspectiveCamera & operator= (const SkewedPerspectiveCamera &other)
virtual void serialize (Serializer &s) const override
void setFovy (double val)
virtual void setLookFrom (dvec3 val) override
virtual void setLookTo (dvec3 val) override
void setOffset (dvec2 offset)
 SkewedPerspectiveCamera (const SkewedPerspectiveCamera &other)
 SkewedPerspectiveCamera (dvec3 lookFrom=cameradefaults::lookFrom, dvec3 lookTo=cameradefaults::lookTo, dvec3 lookUp=cameradefaults::lookUp, double nearPlane=cameradefaults::nearPlane, double farPlane=cameradefaults::farPlane, double aspectRatio=cameradefaults::aspectRatio, double fieldOfView=cameradefaults::fieldOfView, dvec2 frustumOffset=dvec2(0.0, 0.0))
virtual void updateFrom (const Camera &source) override
virtual void zoom (const ZoomOptions &opts) override
Public Member Functions inherited from inviwo::Camera
 Camera (Camera &&other) noexcept=default
 Camera (const Camera &other)=default
 Camera (dvec3 lookFrom, dvec3 lookTo, dvec3 lookUp, double nearPlane, double farPlane, double aspectRatio)
 Create a camera.
virtual double getAspectRatio () const
virtual dvec4 getClipPosFromNormalizedDeviceCoords (const dvec3 &ndcCoords) const
 Convert from normalized device coordinates (xyz in [-1 1]) to clip coordinates, where z value of -1 correspond to the near plane and 1 to the far plane. Coordinates outside of the [-1 1]^3 range will be clipped.
dvec3 getDirection () const
 Get unnormalized direction of camera: lookTo - lookFrom.
double getFarPlaneDist () const
const dmat4 & getInverseProjectionMatrix () const
const dmat4 & getInverseViewMatrix () const
const dvec3 & getLookFrom () const
dvec3 getLookRight () const
const dvec3 & getLookTo () const
const dvec3 & getLookUp () const
double getNearPlaneDist () const
dvec3 getNormalizedDeviceFromNormalizedScreenAtFocusPointDepth (const dvec2 &normalizedScreenCoord) const
const dmat4 & getProjectionMatrix () const
const dmat4 & getViewMatrix () const
dvec3 getWorldPosFromNormalizedDeviceCoords (const dvec3 &ndcCoords) const
 Convert from normalized device coordinates (xyz in [-1 1]) to world coordinates.
Cameraoperator= (Camera &&other) noexcept=default
Cameraoperator= (const Camera &other)=default
virtual void setAspectRatio (double val)
virtual void setFarPlaneDist (double distance)
 Set distance to the far plane from lookFrom.
void setLook (dvec3 lookFrom, dvec3 lookTo, dvec3 lookUp)
virtual void setLookUp (dvec3 val)
virtual void setNearPlaneDist (double distance)
 Set distance to the near plane from lookFrom.

Static Public Attributes

static constexpr std::string_view classIdentifier {"SkewedPerspectiveCamera"}

Protected Member Functions

virtual dmat4 calculateProjectionMatrix () const override
 Calculate and return the projection matrix for the camera.
virtual dmat4 calculateViewMatrix () const override
virtual bool equal (const Camera &other) const override
Protected Member Functions inherited from inviwo::Camera
bool equalTo (const Camera &other) const
void invalidateProjectionMatrix ()
void invalidateViewMatrix ()

Protected Attributes

double fovy_
dvec2 offset_
Protected Attributes inherited from inviwo::Camera
double aspectRatio_
CameraPropertycamprop_ = nullptr
double farPlaneDist_
 Distance to the far plane from lookFrom.
bool invalidProjectionMatrix_
bool invalidViewMatrix_
dmat4 inverseProjectionMatrix_
dmat4 inverseViewMatrix_
dvec3 lookFrom_
dvec3 lookTo_
dvec3 lookUp_
double nearPlaneDist_
 Distance to the near plane from lookFrom.
dmat4 projectionMatrix_
dmat4 viewMatrix_

Detailed Description

Camera with off axis perspective projection.

The camera with unsymmetrical frustum for stereo in VR Kooima, Robert. "Generalized perspective projection." School of Elect. Eng. and Computer Science (2008): 1-7.

See also
Camera

Member Function Documentation

◆ calculateProjectionMatrix()

virtual dmat4 inviwo::SkewedPerspectiveCamera::calculateProjectionMatrix ( ) const
overrideprotectedvirtual

Calculate and return the projection matrix for the camera.

Implement this function to provide your own projection computation functionality. For example orthogonal or perspective projection. This function will be called when the projection matrix is invalid.

See also
PerspectiveCamera
OrthographicCamera

Implements inviwo::Camera.

◆ calculateViewMatrix()

virtual dmat4 inviwo::SkewedPerspectiveCamera::calculateViewMatrix ( ) const
overrideprotectedvirtual

Reimplemented from inviwo::Camera.

◆ clone()

virtual SkewedPerspectiveCamera * inviwo::SkewedPerspectiveCamera::clone ( ) const
overridevirtual

Implements inviwo::Camera.

◆ configureProperties()

virtual void inviwo::SkewedPerspectiveCamera::configureProperties ( CameraProperty & cameraProperty,
bool attach )
overridevirtual

Reimplemented from inviwo::Camera.

◆ deserialize()

virtual void inviwo::SkewedPerspectiveCamera::deserialize ( Deserializer & d)
overridevirtual

Reimplemented from inviwo::Camera.

◆ equal()

virtual bool inviwo::SkewedPerspectiveCamera::equal ( const Camera & other) const
overrideprotectedvirtual

Implements inviwo::Camera.

◆ getClassIdentifier()

virtual std::string_view inviwo::SkewedPerspectiveCamera::getClassIdentifier ( ) const
overridevirtual

Implements inviwo::Camera.

◆ serialize()

virtual void inviwo::SkewedPerspectiveCamera::serialize ( Serializer & s) const
overridevirtual

Reimplemented from inviwo::Camera.

◆ setLookFrom()

virtual void inviwo::SkewedPerspectiveCamera::setLookFrom ( dvec3 val)
overridevirtual

Reimplemented from inviwo::Camera.

◆ setLookTo()

virtual void inviwo::SkewedPerspectiveCamera::setLookTo ( dvec3 val)
overridevirtual

Reimplemented from inviwo::Camera.

◆ updateFrom()

virtual void inviwo::SkewedPerspectiveCamera::updateFrom ( const Camera & source)
overridevirtual

Reimplemented from inviwo::Camera.

◆ zoom()

virtual void inviwo::SkewedPerspectiveCamera::zoom ( const ZoomOptions & opts)
overridevirtual

Implements inviwo::Camera.


The documentation for this class was generated from the following file:
  • include/inviwo/core/datastructures/camera/skewedperspectivecamera.h