MeshLib Documentation
Loading...
Searching...
No Matches
MR::Viewport Class Reference

#include <MRViewport.h>

Classes

struct  LinePointImmediateRenderParams
 Rendering parameters for immediate drawing of lines and points. More...
 
struct  Parameters
 
struct  PickRenderObjectParams
 
struct  TriCornerColors
 

Public Types

using ViewportRectangle = MR::ViewportRectangle
 
using PickRenderObjectPredicate = std::function<bool ( const VisualObject*, ViewportMask )>
 
using FitMode = MR::FitMode
 
using BaseFitParams = MR::BaseFitParams
 
using FitDataParams = MR::FitDataParams
 
using FitBoxParams = MR::FitBoxParams
 

Public Member Functions

MRVIEWER_API Viewport ()
 
MRVIEWER_API ~Viewport ()
 
Viewport clone () const
 
 Viewport (Viewport &&) noexcept=default
 
Viewportoperator= (Viewport &&) noexcept=default
 
MRVIEWER_API void init ()
 
MRVIEWER_API void setAxesPos (const int pixelXoffset=-100, const int pixelYoffset=-100)
 
MRVIEWER_API void setAxesSize (const int axisPixSize=80)
 
MRVIEWER_API void shut ()
 
MRVIEWER_API void clearFramebuffers ()
 
MRVIEWER_API bool draw (const VisualObject &obj, DepthFunction depthFunc=DepthFunction::Default, RenderModelPassMask pass=RenderModelPassMask::All, bool allowAlphaSort=false) const
 
MRVIEWER_API bool draw (const VisualObject &obj, const AffineXf3f &xf, DepthFunction depthFunc=DepthFunction::Default, RenderModelPassMask pass=RenderModelPassMask::All, bool allowAlphaSort=false) const
 
MRVIEWER_API bool draw (const VisualObject &obj, const AffineXf3f &xf, const Matrix4f &projM, DepthFunction depthFunc=DepthFunction::Default, RenderModelPassMask pass=RenderModelPassMask::All, bool allowAlphaSort=false) const
 
MRVIEWER_API void drawLines (const std::vector< LineSegm3f > &lines, const std::vector< SegmEndColors > &colors, const LinePointImmediateRenderParams &params)
 Draw lines immediately.
 
void drawLines (const std::vector< LineSegm3f > &lines, const std::vector< SegmEndColors > &colors, float width=1, bool depthTest=true)
 
MRVIEWER_API void drawPoints (const std::vector< Vector3f > &points, const std::vector< Vector4f > &colors, const LinePointImmediateRenderParams &params)
 Draw points immediately.
 
void drawPoints (const std::vector< Vector3f > &points, const std::vector< Vector4f > &colors, float width=1, bool depthTest=true)
 
MRVIEWER_API void drawTris (const std::vector< Triangle3f > &tris, const std::vector< TriCornerColors > &colors, const ModelRenderParams &params, bool depthTest=true)
 Draw triangles immediately (flat shaded)
 
MRVIEWER_API void drawTris (const std::vector< Triangle3f > &tris, const std::vector< TriCornerColors > &colors, const Matrix4f &modelM={}, bool depthTest=true)
 
BaseRenderParams getBaseRenderParams () const
 Prepares base rendering parameters for this viewport.
 
BaseRenderParams getBaseRenderParams (const Matrix4f &projM) const
 Prepares base rendering parameters for this viewport with custom projection matrix.
 
ModelRenderParams getModelRenderParams (const Matrix4f &modelM, Matrix4f *normM, DepthFunction depthFunc=DepthFunction::Default, RenderModelPassMask pass=RenderModelPassMask::All, bool allowAlphaSort=false) const
 Prepares rendering parameters to draw a model with given transformation in this viewport.
 
MRVIEWER_API ModelRenderParams getModelRenderParams (const Matrix4f &modelM, const Matrix4f &projM, Matrix4f *normM, DepthFunction depthFunc=DepthFunction::Default, RenderModelPassMask pass=RenderModelPassMask::All, bool allowAlphaSort=false) const
 Prepares rendering parameters to draw a model with given transformation in this viewport with custom projection matrix.
 
MRVIEWER_API ObjAndPick pickRenderObject (const PickRenderObjectParams &params=PickRenderObjectParams::defaults()) const
 
MRVIEWER_API ObjAndPick pickRenderObject (std::span< VisualObject *const > objects, const PickRenderObjectParams &params=PickRenderObjectParams::defaults()) const
 
MRVIEWER_API ConstObjAndPick pickRenderObjectConst (std::span< const VisualObject *const > objects, const PickRenderObjectParams &params=PickRenderObjectParams::defaults()) const
 
MRVIEWER_API ObjAndPick pick_render_object () const
 
MRVIEWER_API ObjAndPick pick_render_object (uint16_t pickRadius) const
 
MRVIEWER_API ObjAndPick pick_render_object (const std::vector< VisualObject * > &objects) const
 
MRVIEWER_API ObjAndPick pick_render_object (const std::vector< VisualObject * > &objects, uint16_t pickRadius, bool exactPickFirst=true) const
 
MRVIEWER_API ObjAndPick pick_render_object (bool exactPickFirst) const
 
MRVIEWER_API ObjAndPick pick_render_object (const Vector2f &viewportPoint) const
 
MRVIEWER_API ObjAndPick pick_render_object (const std::vector< VisualObject * > &objects, const Vector2f &viewportPoint) const
 
MRVIEWER_API std::vector< ObjAndPickmultiPickObjects (std::span< VisualObject *const > objects, const std::vector< Vector2f > &viewportPoints) const
 
MRVIEWER_API std::vector< std::shared_ptr< VisualObject > > findObjectsInRect (const Box2i &rect, int maxRenderResolutionSide=512) const
 
MRVIEWER_API std::unordered_map< std::shared_ptr< ObjectMesh >, FaceBitSet > findVisibleFaces (const BitSet &includePixBs, int maxRenderResolutionSide=512) const
 
MRVIEWER_API ConstObjAndPick const_pick_render_object () const
 
MRVIEWER_API ConstObjAndPick const_pick_render_object (const std::vector< const VisualObject * > &objects) const
 
MRVIEWER_API std::vector< ConstObjAndPickconstMultiPickObjects (const std::vector< const VisualObject * > &objects, const std::vector< Vector2f > &viewportPoints) const
 
MRVIEWER_API void transformView (const AffineXf3f &xf)
 
bool getRedrawFlag () const
 
void resetRedrawFlag ()
 
MRVIEWER_API void setRotation (bool state)
 
MRVIEWER_API const ViewportRectanglegetViewportRect () const
 
MRVIEWER_API float getPixelSize () const
 
MRVIEWER_API float getPixelSizeAtPoint (const Vector3f &worldPoint) const
 
MRVIEWER_API void setViewportRect (const ViewportRectangle &rect)
 
MRVIEWER_API AffineXf3f getUnscaledViewXf () const
 returns orthonormal matrix with translation
 
AffineXf3f getViewXf () const
 converts directly from the view matrix
 
Vector3f getUpDirection () const
 returns unit vector in world space corresponding to up-direction in camera space
 
Vector3f getRightDirection () const
 returns unit vector in world space corresponding to right-direction in camera space
 
Vector3f getBackwardDirection () const
 returns unit vector in world space corresponding to direction toward camera in camera space
 
MRVIEWER_API Line3f unprojectPixelRay (const Vector2f &viewportPoint) const
 
MRVIEWER_API Vector3f worldToCameraSpace (const Vector3f &p) const
 
MRVIEWER_API std::vector< Vector3f > worldToCameraSpace (const std::vector< Vector3f > &p) const
 
MRVIEWER_API Vector3f projectToClipSpace (const Vector3f &worldPoint) const
 
MRVIEWER_API std::vector< Vector3f > projectToClipSpace (const std::vector< Vector3f > &worldPoints) const
 
MRVIEWER_API Vector3f unprojectFromClipSpace (const Vector3f &clipPoint) const
 
MRVIEWER_API std::vector< Vector3f > unprojectFromClipSpace (const std::vector< Vector3f > &clipPoints) const
 
MRVIEWER_API Vector3f projectToViewportSpace (const Vector3f &worldPoint) const
 
MRVIEWER_API std::vector< Vector3f > projectToViewportSpace (const std::vector< Vector3f > &worldPoints) const
 
MRVIEWER_API Vector3f unprojectFromViewportSpace (const Vector3f &viewportPoint) const
 
MRVIEWER_API std::vector< Vector3f > unprojectFromViewportSpace (const std::vector< Vector3f > &viewportPoints) const
 
MRVIEWER_API Vector3f clipSpaceToViewportSpace (const Vector3f &p) const
 
MRVIEWER_API std::vector< Vector3f > clipSpaceToViewportSpace (const std::vector< Vector3f > &p) const
 
MRVIEWER_API Vector3f viewportSpaceToClipSpace (const Vector3f &p) const
 
MRVIEWER_API std::vector< Vector3f > viewportSpaceToClipSpace (const std::vector< Vector3f > &p) const
 
void setupView ()
 
void preDraw ()
 
void postDraw () const
 
MRVIEWER_API void fitData (float fill=1.0f, bool snapView=true)
 
MRVIEWER_API void fitBox (const Box3f &newSceneBox, float fill=1.0f, bool snapView=true)
 
MRVIEWER_API void preciseFitBoxToScreenBorder (const FitBoxParams &params)
 
MRVIEWER_API void preciseFitDataToScreenBorder (const FitDataParams &params={})
 
MRVIEWER_API float getRatio () const
 
MRVIEWER_API bool allModelsInsideViewportRectangle () const
 
MRVIEWER_API const Box3f & getSceneBox () const
 
const ParametersgetParameters () const
 
MRVIEWER_API Vector3f getCameraPoint () const
 
MRVIEWER_API void setCameraPoint (const Vector3f &cameraWorldPos)
 
MRVIEWER_API void setCameraTrackballAngle (const Quaternionf &rot)
 
MRVIEWER_API void setCameraTranslation (const Vector3f &translation)
 
MRVIEWER_API void setCameraViewAngle (float newViewAngle)
 
MRVIEWER_API void setCameraZoom (float zoom)
 
MRVIEWER_API void setOrthographic (bool orthographic)
 
MRVIEWER_API void setBackgroundColor (const Color &color)
 
MRVIEWER_API void setClippingPlane (const Plane3f &plane)
 
MRVIEWER_API void setLabel (std::string s)
 
void setSelectable (bool on)
 
MRVIEWER_API void showAxes (bool on)
 
MRVIEWER_API void showClippingPlane (bool on)
 
MRVIEWER_API void showRotationCenter (bool on)
 
MRVIEWER_API void showGlobalBasis (bool on)
 
MRVIEWER_API void rotationCenterMode (Parameters::RotationCenterMode mode)
 
MRVIEWER_API void setParameters (const Viewport::Parameters &params)
 
MRVIEWER_API void cameraLookAlong (const Vector3f &dir, const Vector3f &up)
 
MRVIEWER_API void cameraRotateAround (const Line3f &axis, float angle)
 
MRVIEWER_API Vector3f getRotationPivot () const
 

Static Public Member Functions

static MRVIEWER_API Viewportget (ViewportId viewportId={})
 

Public Attributes

ViewportId id { 1}
 

Member Typedef Documentation

◆ BaseFitParams

◆ FitBoxParams

◆ FitDataParams

◆ FitMode

◆ PickRenderObjectPredicate

using MR::Viewport::PickRenderObjectPredicate = std::function<bool ( const VisualObject*, ViewportMask )>

◆ ViewportRectangle

Constructor & Destructor Documentation

◆ Viewport() [1/2]

MRVIEWER_API MR::Viewport::Viewport ( )

◆ ~Viewport()

MRVIEWER_API MR::Viewport::~Viewport ( )

◆ Viewport() [2/2]

MR::Viewport::Viewport ( Viewport && )
defaultnoexcept

Member Function Documentation

◆ allModelsInsideViewportRectangle()

MRVIEWER_API bool MR::Viewport::allModelsInsideViewportRectangle ( ) const

◆ cameraLookAlong()

MRVIEWER_API void MR::Viewport::cameraLookAlong ( const Vector3f & dir,
const Vector3f & up )

◆ cameraRotateAround()

MRVIEWER_API void MR::Viewport::cameraRotateAround ( const Line3f & axis,
float angle )

◆ clearFramebuffers()

MRVIEWER_API void MR::Viewport::clearFramebuffers ( )

◆ clipSpaceToViewportSpace() [1/2]

MRVIEWER_API std::vector< Vector3f > MR::Viewport::clipSpaceToViewportSpace ( const std::vector< Vector3f > & p) const

◆ clipSpaceToViewportSpace() [2/2]

MRVIEWER_API Vector3f MR::Viewport::clipSpaceToViewportSpace ( const Vector3f & p) const

◆ clone()

Viewport MR::Viewport::clone ( ) const
inlinenodiscard

◆ const_pick_render_object() [1/2]

MRVIEWER_API ConstObjAndPick MR::Viewport::const_pick_render_object ( ) const

◆ const_pick_render_object() [2/2]

MRVIEWER_API ConstObjAndPick MR::Viewport::const_pick_render_object ( const std::vector< const VisualObject * > & objects) const

◆ constMultiPickObjects()

MRVIEWER_API std::vector< ConstObjAndPick > MR::Viewport::constMultiPickObjects ( const std::vector< const VisualObject * > & objects,
const std::vector< Vector2f > & viewportPoints ) const

◆ draw() [1/3]

MRVIEWER_API bool MR::Viewport::draw ( const VisualObject & obj,
const AffineXf3f & xf,
const Matrix4f & projM,
DepthFunction depthFunc = DepthFunction::Default,
RenderModelPassMask pass = RenderModelPassMask::All,
bool allowAlphaSort = false ) const

Immediate draw of given object with given transformation to world and given projection matrix Returns true if something was drawn.

◆ draw() [2/3]

MRVIEWER_API bool MR::Viewport::draw ( const VisualObject & obj,
const AffineXf3f & xf,
DepthFunction depthFunc = DepthFunction::Default,
RenderModelPassMask pass = RenderModelPassMask::All,
bool allowAlphaSort = false ) const

Immediate draw of given object with given transformation to world Returns true if something was drawn.

◆ draw() [3/3]

MRVIEWER_API bool MR::Viewport::draw ( const VisualObject & obj,
DepthFunction depthFunc = DepthFunction::Default,
RenderModelPassMask pass = RenderModelPassMask::All,
bool allowAlphaSort = false ) const

Immediate draw of given object with transformation to world taken from object's scene Returns true if something was drawn.

◆ drawLines() [1/2]

MRVIEWER_API void MR::Viewport::drawLines ( const std::vector< LineSegm3f > & lines,
const std::vector< SegmEndColors > & colors,
const LinePointImmediateRenderParams & params )

Draw lines immediately.

◆ drawLines() [2/2]

void MR::Viewport::drawLines ( const std::vector< LineSegm3f > & lines,
const std::vector< SegmEndColors > & colors,
float width = 1,
bool depthTest = true )
inline

◆ drawPoints() [1/2]

MRVIEWER_API void MR::Viewport::drawPoints ( const std::vector< Vector3f > & points,
const std::vector< Vector4f > & colors,
const LinePointImmediateRenderParams & params )

Draw points immediately.

◆ drawPoints() [2/2]

void MR::Viewport::drawPoints ( const std::vector< Vector3f > & points,
const std::vector< Vector4f > & colors,
float width = 1,
bool depthTest = true )
inline

◆ drawTris() [1/2]

MRVIEWER_API void MR::Viewport::drawTris ( const std::vector< Triangle3f > & tris,
const std::vector< TriCornerColors > & colors,
const Matrix4f & modelM = {},
bool depthTest = true )

◆ drawTris() [2/2]

MRVIEWER_API void MR::Viewport::drawTris ( const std::vector< Triangle3f > & tris,
const std::vector< TriCornerColors > & colors,
const ModelRenderParams & params,
bool depthTest = true )

Draw triangles immediately (flat shaded)

◆ findObjectsInRect()

MRVIEWER_API std::vector< std::shared_ptr< VisualObject > > MR::Viewport::findObjectsInRect ( const Box2i & rect,
int maxRenderResolutionSide = 512 ) const

◆ findVisibleFaces()

MRVIEWER_API std::unordered_map< std::shared_ptr< ObjectMesh >, FaceBitSet > MR::Viewport::findVisibleFaces ( const BitSet & includePixBs,
int maxRenderResolutionSide = 512 ) const

◆ fitBox()

MRVIEWER_API void MR::Viewport::fitBox ( const Box3f & newSceneBox,
float fill = 1.0f,
bool snapView = true )

◆ fitData()

MRVIEWER_API void MR::Viewport::fitData ( float fill = 1.0f,
bool snapView = true )

◆ get()

static MRVIEWER_API Viewport & MR::Viewport::get ( ViewportId viewportId = {})
static

Return the current viewport, or the viewport corresponding to a given unique identifier from ViewerInstance()

Parameters
viewportIdunique identifier corresponding to the desired viewport (current viewport if 0)

◆ getBackwardDirection()

Vector3f MR::Viewport::getBackwardDirection ( ) const
inlinenodiscard

returns unit vector in world space corresponding to direction toward camera in camera space

◆ getBaseRenderParams() [1/2]

BaseRenderParams MR::Viewport::getBaseRenderParams ( ) const
inlinenodiscard

Prepares base rendering parameters for this viewport.

◆ getBaseRenderParams() [2/2]

BaseRenderParams MR::Viewport::getBaseRenderParams ( const Matrix4f & projM) const
inlinenodiscard

Prepares base rendering parameters for this viewport with custom projection matrix.

◆ getCameraPoint()

MRVIEWER_API Vector3f MR::Viewport::getCameraPoint ( ) const

◆ getModelRenderParams() [1/2]

MRVIEWER_API ModelRenderParams MR::Viewport::getModelRenderParams ( const Matrix4f & modelM,
const Matrix4f & projM,
Matrix4f * normM,
DepthFunction depthFunc = DepthFunction::Default,
RenderModelPassMask pass = RenderModelPassMask::All,
bool allowAlphaSort = false ) const
nodiscard

Prepares rendering parameters to draw a model with given transformation in this viewport with custom projection matrix.

Parameters
normMif not null, this matrix of normals transformation will be computed and referenced in the result
allowAlphaSortIf not null and the object is semitransparent, enable alpha-sorting.

◆ getModelRenderParams() [2/2]

ModelRenderParams MR::Viewport::getModelRenderParams ( const Matrix4f & modelM,
Matrix4f * normM,
DepthFunction depthFunc = DepthFunction::Default,
RenderModelPassMask pass = RenderModelPassMask::All,
bool allowAlphaSort = false ) const
inlinenodiscard

Prepares rendering parameters to draw a model with given transformation in this viewport.

Parameters
modelMmodel to world transformation, this matrix will be referenced in the result
normMif not null, this matrix of normals transformation will be computed and referenced in the result
allowAlphaSortIf not null and the object is semitransparent, enable alpha-sorting.

◆ getParameters()

const Parameters & MR::Viewport::getParameters ( ) const
inline

◆ getPixelSize()

MRVIEWER_API float MR::Viewport::getPixelSize ( ) const

◆ getPixelSizeAtPoint()

MRVIEWER_API float MR::Viewport::getPixelSizeAtPoint ( const Vector3f & worldPoint) const

◆ getRatio()

MRVIEWER_API float MR::Viewport::getRatio ( ) const

◆ getRedrawFlag()

bool MR::Viewport::getRedrawFlag ( ) const
inline

◆ getRightDirection()

Vector3f MR::Viewport::getRightDirection ( ) const
inlinenodiscard

returns unit vector in world space corresponding to right-direction in camera space

◆ getRotationPivot()

MRVIEWER_API Vector3f MR::Viewport::getRotationPivot ( ) const

◆ getSceneBox()

MRVIEWER_API const Box3f & MR::Viewport::getSceneBox ( ) const

◆ getUnscaledViewXf()

MRVIEWER_API AffineXf3f MR::Viewport::getUnscaledViewXf ( ) const
nodiscard

returns orthonormal matrix with translation

◆ getUpDirection()

Vector3f MR::Viewport::getUpDirection ( ) const
inlinenodiscard

returns unit vector in world space corresponding to up-direction in camera space

◆ getViewportRect()

MRVIEWER_API const ViewportRectangle & MR::Viewport::getViewportRect ( ) const

◆ getViewXf()

AffineXf3f MR::Viewport::getViewXf ( ) const
inlinenodiscard

converts directly from the view matrix

◆ init()

MRVIEWER_API void MR::Viewport::init ( )

◆ multiPickObjects()

MRVIEWER_API std::vector< ObjAndPick > MR::Viewport::multiPickObjects ( std::span< VisualObject *const > objects,
const std::vector< Vector2f > & viewportPoints ) const

◆ operator=()

Viewport & MR::Viewport::operator= ( Viewport && )
defaultnoexcept

◆ pick_render_object() [1/7]

MRVIEWER_API ObjAndPick MR::Viewport::pick_render_object ( ) const

◆ pick_render_object() [2/7]

MRVIEWER_API ObjAndPick MR::Viewport::pick_render_object ( bool exactPickFirst) const

◆ pick_render_object() [3/7]

MRVIEWER_API ObjAndPick MR::Viewport::pick_render_object ( const std::vector< VisualObject * > & objects) const

◆ pick_render_object() [4/7]

MRVIEWER_API ObjAndPick MR::Viewport::pick_render_object ( const std::vector< VisualObject * > & objects,
const Vector2f & viewportPoint ) const

◆ pick_render_object() [5/7]

MRVIEWER_API ObjAndPick MR::Viewport::pick_render_object ( const std::vector< VisualObject * > & objects,
uint16_t pickRadius,
bool exactPickFirst = true ) const

◆ pick_render_object() [6/7]

MRVIEWER_API ObjAndPick MR::Viewport::pick_render_object ( const Vector2f & viewportPoint) const

◆ pick_render_object() [7/7]

MRVIEWER_API ObjAndPick MR::Viewport::pick_render_object ( uint16_t pickRadius) const

◆ pickRenderObject() [1/2]

MRVIEWER_API ObjAndPick MR::Viewport::pickRenderObject ( const PickRenderObjectParams & params = PickRenderObjectParams::defaults()) const

◆ pickRenderObject() [2/2]

MRVIEWER_API ObjAndPick MR::Viewport::pickRenderObject ( std::span< VisualObject *const > objects,
const PickRenderObjectParams & params = PickRenderObjectParams::defaults() ) const

◆ pickRenderObjectConst()

MRVIEWER_API ConstObjAndPick MR::Viewport::pickRenderObjectConst ( std::span< const VisualObject *const > objects,
const PickRenderObjectParams & params = PickRenderObjectParams::defaults() ) const

◆ postDraw()

void MR::Viewport::postDraw ( ) const

◆ preciseFitBoxToScreenBorder()

MRVIEWER_API void MR::Viewport::preciseFitBoxToScreenBorder ( const FitBoxParams & params)

◆ preciseFitDataToScreenBorder()

MRVIEWER_API void MR::Viewport::preciseFitDataToScreenBorder ( const FitDataParams & params = {})

◆ preDraw()

void MR::Viewport::preDraw ( )

◆ projectToClipSpace() [1/2]

MRVIEWER_API std::vector< Vector3f > MR::Viewport::projectToClipSpace ( const std::vector< Vector3f > & worldPoints) const

◆ projectToClipSpace() [2/2]

MRVIEWER_API Vector3f MR::Viewport::projectToClipSpace ( const Vector3f & worldPoint) const

◆ projectToViewportSpace() [1/2]

MRVIEWER_API std::vector< Vector3f > MR::Viewport::projectToViewportSpace ( const std::vector< Vector3f > & worldPoints) const

◆ projectToViewportSpace() [2/2]

MRVIEWER_API Vector3f MR::Viewport::projectToViewportSpace ( const Vector3f & worldPoint) const

◆ resetRedrawFlag()

void MR::Viewport::resetRedrawFlag ( )
inline

◆ rotationCenterMode()

MRVIEWER_API void MR::Viewport::rotationCenterMode ( Parameters::RotationCenterMode mode)

◆ setAxesPos()

MRVIEWER_API void MR::Viewport::setAxesPos ( const int pixelXoffset = -100,
const int pixelYoffset = -100 )

◆ setAxesSize()

MRVIEWER_API void MR::Viewport::setAxesSize ( const int axisPixSize = 80)

◆ setBackgroundColor()

MRVIEWER_API void MR::Viewport::setBackgroundColor ( const Color & color)

◆ setCameraPoint()

MRVIEWER_API void MR::Viewport::setCameraPoint ( const Vector3f & cameraWorldPos)

◆ setCameraTrackballAngle()

MRVIEWER_API void MR::Viewport::setCameraTrackballAngle ( const Quaternionf & rot)

◆ setCameraTranslation()

MRVIEWER_API void MR::Viewport::setCameraTranslation ( const Vector3f & translation)

◆ setCameraViewAngle()

MRVIEWER_API void MR::Viewport::setCameraViewAngle ( float newViewAngle)

◆ setCameraZoom()

MRVIEWER_API void MR::Viewport::setCameraZoom ( float zoom)

◆ setClippingPlane()

MRVIEWER_API void MR::Viewport::setClippingPlane ( const Plane3f & plane)

◆ setLabel()

MRVIEWER_API void MR::Viewport::setLabel ( std::string s)

◆ setOrthographic()

MRVIEWER_API void MR::Viewport::setOrthographic ( bool orthographic)

◆ setParameters()

MRVIEWER_API void MR::Viewport::setParameters ( const Viewport::Parameters & params)

◆ setRotation()

MRVIEWER_API void MR::Viewport::setRotation ( bool state)

◆ setSelectable()

void MR::Viewport::setSelectable ( bool on)
inline

◆ setupView()

void MR::Viewport::setupView ( )

◆ setViewportRect()

MRVIEWER_API void MR::Viewport::setViewportRect ( const ViewportRectangle & rect)

◆ showAxes()

MRVIEWER_API void MR::Viewport::showAxes ( bool on)

◆ showClippingPlane()

MRVIEWER_API void MR::Viewport::showClippingPlane ( bool on)

◆ showGlobalBasis()

MRVIEWER_API void MR::Viewport::showGlobalBasis ( bool on)

◆ showRotationCenter()

MRVIEWER_API void MR::Viewport::showRotationCenter ( bool on)

◆ shut()

MRVIEWER_API void MR::Viewport::shut ( )

◆ transformView()

MRVIEWER_API void MR::Viewport::transformView ( const AffineXf3f & xf)

◆ unprojectFromClipSpace() [1/2]

MRVIEWER_API std::vector< Vector3f > MR::Viewport::unprojectFromClipSpace ( const std::vector< Vector3f > & clipPoints) const

◆ unprojectFromClipSpace() [2/2]

MRVIEWER_API Vector3f MR::Viewport::unprojectFromClipSpace ( const Vector3f & clipPoint) const

◆ unprojectFromViewportSpace() [1/2]

MRVIEWER_API std::vector< Vector3f > MR::Viewport::unprojectFromViewportSpace ( const std::vector< Vector3f > & viewportPoints) const

◆ unprojectFromViewportSpace() [2/2]

MRVIEWER_API Vector3f MR::Viewport::unprojectFromViewportSpace ( const Vector3f & viewportPoint) const

◆ unprojectPixelRay()

MRVIEWER_API Line3f MR::Viewport::unprojectPixelRay ( const Vector2f & viewportPoint) const

◆ viewportSpaceToClipSpace() [1/2]

MRVIEWER_API std::vector< Vector3f > MR::Viewport::viewportSpaceToClipSpace ( const std::vector< Vector3f > & p) const

◆ viewportSpaceToClipSpace() [2/2]

MRVIEWER_API Vector3f MR::Viewport::viewportSpaceToClipSpace ( const Vector3f & p) const

◆ worldToCameraSpace() [1/2]

MRVIEWER_API std::vector< Vector3f > MR::Viewport::worldToCameraSpace ( const std::vector< Vector3f > & p) const

◆ worldToCameraSpace() [2/2]

MRVIEWER_API Vector3f MR::Viewport::worldToCameraSpace ( const Vector3f & p) const

Member Data Documentation

◆ id

ViewportId MR::Viewport::id { 1}

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