![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
Orthographic camera for plotting that does not preserve aspect ratios. More...
#include <plotcamera.h>
Public Member Functions | |
PlotCamera (vec3 lookFrom=cameradefaults::lookFrom, vec3 lookTo=cameradefaults::lookTo, vec3 lookUp=cameradefaults::lookUp, float nearPlane=cameradefaults::nearPlane, float farPlane=cameradefaults::farPlane, float aspectRatio=cameradefaults::aspectRatio, vec2 size=vec2{300, 300}) | |
PlotCamera (const PlotCamera &other) | |
PlotCamera & | operator= (const PlotCamera &other) |
PlotCamera (PlotCamera &&other) noexcept | |
PlotCamera & | operator= (PlotCamera &&other) noexcept |
virtual PlotCamera * | clone () const override |
virtual std::string_view | getClassIdentifier () const override |
virtual void | updateFrom (const Camera &source) override |
virtual void | configureProperties (CameraProperty &cp, bool attach) override |
vec2 | getSize () const |
void | setSize (vec2 size) |
virtual void | zoom (const ZoomOptions &opts) override |
virtual vec4 | getClipPosFromNormalizedDeviceCoords (const vec3 &ndcCoords) const override |
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. | |
virtual void | serialize (Serializer &s) const override |
virtual void | deserialize (Deserializer &d) override |
Public Member Functions inherited from inviwo::Camera | |
Camera (vec3 lookFrom, vec3 lookTo, vec3 lookUp, float nearPlane, float farPlane, float aspectRatio) | |
Create a camera. | |
Camera (const Camera &other)=default | |
Camera & | operator= (const Camera &other)=default |
Camera (Camera &&other) noexcept=default | |
Camera & | operator= (Camera &&other) noexcept=default |
const vec3 & | getLookFrom () const |
virtual void | setLookFrom (vec3 val) |
const vec3 & | getLookTo () const |
virtual void | setLookTo (vec3 val) |
const vec3 & | getLookUp () const |
virtual void | setLookUp (vec3 val) |
void | setLook (vec3 lookFrom, vec3 lookTo, vec3 lookUp) |
virtual float | getAspectRatio () const |
virtual void | setAspectRatio (float val) |
vec3 | getDirection () const |
Get unnormalized direction of camera: lookTo - lookFrom. | |
virtual void | setNearPlaneDist (float distance) |
Set distance to the near plane from lookFrom. | |
float | getNearPlaneDist () const |
virtual void | setFarPlaneDist (float distance) |
Set distance to the far plane from lookFrom. | |
float | getFarPlaneDist () const |
const mat4 & | getViewMatrix () const |
const mat4 & | getProjectionMatrix () const |
const mat4 & | getInverseViewMatrix () const |
const mat4 & | getInverseProjectionMatrix () const |
vec3 | getWorldPosFromNormalizedDeviceCoords (const vec3 &ndcCoords) const |
Convert from normalized device coordinates (xyz in [-1 1]) to world coordinates. | |
vec3 | getNormalizedDeviceFromNormalizedScreenAtFocusPointDepth (const vec2 &normalizedScreenCoord) const |
Static Public Attributes | |
static constexpr std::string_view | classIdentifier {"PlotCamera"} |
Protected Member Functions | |
virtual bool | equal (const Camera &other) const override |
virtual mat4 | calculateProjectionMatrix () const override |
Calculate and return the projection matrix for the camera. | |
Protected Member Functions inherited from inviwo::Camera | |
bool | equalTo (const Camera &other) const |
virtual mat4 | calculateViewMatrix () const |
void | invalidateViewMatrix () |
void | invalidateProjectionMatrix () |
Protected Attributes | |
vec2 | size_ |
Protected Attributes inherited from inviwo::Camera | |
vec3 | lookFrom_ |
vec3 | lookTo_ |
vec3 | lookUp_ |
float | nearPlaneDist_ |
Distance to the near plane from lookFrom. | |
float | farPlaneDist_ |
Distance to the far plane from lookFrom. | |
float | aspectRatio_ |
bool | invalidViewMatrix_ |
bool | invalidProjectionMatrix_ |
mat4 | viewMatrix_ |
mat4 | projectionMatrix_ |
mat4 | inverseViewMatrix_ |
mat4 | inverseProjectionMatrix_ |
CameraProperty * | camprop_ = nullptr |
Orthographic camera for plotting that does not preserve aspect ratios.
The PlotCamera is a specialized orthographic camera designed for plotting and visualization tasks where maintaining the original aspect ratio of the view is not required. Unlike standard orthographic cameras, PlotCamera allows independent scaling of the view along each axis, enabling flexible and non-uniform projections suitable for data visualization.
|
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.
Implements inviwo::Camera.
|
overridevirtual |
Implements inviwo::Camera.
|
overridevirtual |
Reimplemented from inviwo::Camera.
|
overridevirtual |
Reimplemented from inviwo::Camera.
|
overrideprotectedvirtual |
Implements inviwo::Camera.
|
overridevirtual |
Implements inviwo::Camera.
|
overridevirtual |
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.
ndcCoords | xyz clip-coordinates in [-1 1]^3, and the clip w-coordinate used for perspective division. |
Reimplemented from inviwo::Camera.
|
overridevirtual |
Reimplemented from inviwo::Camera.
|
overridevirtual |
Reimplemented from inviwo::Camera.
|
overridevirtual |
Implements inviwo::Camera.