1 #ifndef VolViz_Camera_h
2 #define VolViz_Camera_h
74 Length ambientScale) const noexcept;
98 class AxisAlignedPlane;
104 friend class ::VolViz::Camera;
122 using namespace literals;
124 Expects(ambientScale > 0_mm);
137 using namespace literals;
139 Expects(ambientScale > 0_mm);
159 Length ambientScale)
const noexcept {
175 auto const w = projPos.w();
177 return projPos.head<3>() /
w;
187 #endif // VolViz_Camera_h
void markAsDirty() noexcept
Definition: AtomicCache.h:38
Eigen::Matrix< Length, 3, 1 > PhysicalPosition
Definition: Types.h:66
Definition: AtomicWrapper.h:48
Property< float > aspectRatio
Aspect ratio (width / height) or horizontal FOV / vertical FOV.
Definition: Camera.h:38
Eigen::Quaternionf Orientation
6-DOF orientation, represented as a quaternion
Definition: Types.h:54
Length cachedScale_
Cached scale of last call to viewMatrix(...)
Definition: Camera.h:93
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glad.h:2276
GLubyte GLubyte GLubyte GLubyte w
Definition: glad.h:2643
Eigen::Vector3f Position
Position in 3D euclidean space.
Definition: Types.h:21
Property< Angle > verticalFieldOfView
Vertical field of view in rad.
Definition: Camera.h:35
Private_::CameraClient client() const noexcept
Definition: Camera.cpp:5
Camera() noexcept
Definition: Camera.cpp:9
AtomicCache< Angle > cachedVerticalFOV_
Cached vertical FOV.
Definition: Camera.h:89
CameraClient(Camera const &cam)
Definition: Camera.h:112
Matrix4 projectionMatrix() const noexcept
Returns the camera's projection matrix.
Definition: Camera.h:115
double Angle
Definition: Types.h:65
Matrix4 viewMatrix() const noexcept
Returns the camera's view matrix, i.e. the inverse camera transform.
Definition: Camera.cpp:56
Definition: AtomicCache.h:22
Matrix4 viewProjectionMatrix(Length ambientScale) const noexcept
Returns the product of projectionMatrix() * viewMatrix(...)
Definition: Camera.h:135
Eigen::Matrix4f Matrix4
Definition: Types.h:18
Property< PhysicalPosition > position
Definition: Camera.h:31
Matrix4 viewMatrix(Length ambientScale) const noexcept
Returns the camera's view matrix, i.e. the inverse camera transform.
Definition: Camera.h:120
AtomicCache< Matrix4 > cachedProjectionMatrix_
Cached projection matrix.
Definition: Camera.h:77
Position unproject(Position2 const &screenPos, float depth, Length ambientScale) const noexcept
Definition: Camera.cpp:79
Matrix4 projectionMatrix() const noexcept
Returns the camera's projection matrix.
Definition: Camera.cpp:32
Property< Orientation > orientation
The camera's orientation.
Definition: Camera.h:27
Definition: VisualizerImpl.h:29
Camera const & cam_
Definition: Camera.h:180
phys::units::quantity< phys::units::length_d > Length
Definition: Types.h:64
Eigen::Vector2f Position2
Position in 2D space.
Definition: Types.h:26
DepthRange depthRange() const noexcept
Definition: Camera.h:50
Position project(Position const &position, Length ambientScale) const noexcept
Definition: Camera.h:169
AtomicCache< Matrix4 > cachedViewMatrix_
Cached view Matrix.
Definition: Camera.h:81
Matrix4 viewProjectionMatrix() const noexcept
Returns the product of projectionMatrix() * viewMatrix(...)
Definition: Camera.cpp:72
Definition: AxisAlignedPlane.h:10
AtomicCache< Matrix4 > cachedViewProjectionMatrix_
Cached product viewMatrix * projectionMatrix.
Definition: Camera.h:85
Eigen::Vector4f PositionH
Position in homogenous coordinates.
Definition: Types.h:23
Position unproject(Position2 const &screenPos, float depth, Length ambientScale) const noexcept
Definition: Camera.h:158