VolViz
A volume visualization tool
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Private Member Functions | Private Attributes | Friends | List of all members
VolViz::Private_::CameraClient Class Reference

#include <Camera.h>

+ Collaboration diagram for VolViz::Private_::CameraClient:

Private Member Functions

 CameraClient (Camera const &cam)
 
Matrix4 projectionMatrix () const noexcept
 Returns the camera's projection matrix. More...
 
Matrix4 viewMatrix (Length ambientScale) const noexcept
 Returns the camera's view matrix, i.e. the inverse camera transform. More...
 
Matrix4 viewProjectionMatrix (Length ambientScale) const noexcept
 Returns the product of projectionMatrix() * viewMatrix(...) More...
 
Position unproject (Position2 const &screenPos, float depth, Length ambientScale) const noexcept
 
Position project (Position const &position, Length ambientScale) const noexcept
 

Private Attributes

Camera const & cam_
 

Friends

class VisualizerImpl
 
class ::VolViz::Camera
 
class AxisAlignedPlane
 
class Cube
 
class Mesh
 

Constructor & Destructor Documentation

VolViz::Private_::CameraClient::CameraClient ( Camera const &  cam)
inlineprivate

Member Function Documentation

Position VolViz::Private_::CameraClient::project ( Position const &  position,
Length  ambientScale 
) const
inlineprivatenoexcept

Projects a 3D point in world coordinates into the screen coordinate system

Parameters
positionposition in 3D world space
ambientScalethe physical length of one unit in the target 3D
Returns
projected position including depth
Matrix4 VolViz::Private_::CameraClient::projectionMatrix ( ) const
inlineprivatenoexcept

Returns the camera's projection matrix.

Position VolViz::Private_::CameraClient::unproject ( Position2 const &  screenPos,
float  depth,
Length  ambientScale 
) const
inlineprivatenoexcept

Unprojectis a point in screen coordinates with known depth into the 3D scene

Parameters
screenPosthe source point in screen coordinate system, i.e. (-1, -1) is the bottom left, (1, 1) is the top right
depththe depth of the pixel at screenPos
ambientScalethe physical length of one unit in the target 3D space
Matrix4 VolViz::Private_::CameraClient::viewMatrix ( Length  ambientScale) const
inlineprivatenoexcept

Returns the camera's view matrix, i.e. the inverse camera transform.

Matrix4 VolViz::Private_::CameraClient::viewProjectionMatrix ( Length  ambientScale) const
inlineprivatenoexcept

Returns the product of projectionMatrix() * viewMatrix(...)

Friends And Related Function Documentation

friend class ::VolViz::Camera
friend
friend class AxisAlignedPlane
friend
friend class Cube
friend
friend class Mesh
friend
friend class VisualizerImpl
friend

Member Data Documentation

Camera const& VolViz::Private_::CameraClient::cam_
private

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