ImFusion C++ SDK 4.4.0
ImFusion::GlCurvedView Class Reference

#include <ImFusion/GL/GlCurvedView.h>

Curved slice view. More...

Inheritance diagram for ImFusion::GlCurvedView:

Detailed Description

Curved slice view.

Classes

struct  OrthoSliceInfo

Public Member Functions

 GlCurvedView (CurvedViewPrimitive &primitive)
GlCurvedSlice * curvedSlice () const
void setShowIntersectionLines (bool flag)
 Specify if the intersection lines of slices shall be drawn.
bool showIntersectionLines () const
 Return if intersection lines of slices are drawn.
bool render () override
 Render the view.
void reset ()
 Reset settings to their default values.
Type type () const override
 Return view type as 2D or 3D slice.
virtual std::string typeName () const
void setScale (double scale)
 Set scale.
double scale () const
void setZoom (double zoom)
 Set zoom.
double zoom () const
double arcLengthToPanoramaCoord (double arcLength) const
double panoramaCoordToArcLength (double panoramaCoord) const
double getCurveLength () const
vec2 viewportToPanoramaCoord (const vec2 &point) const
vec3 panoramaCoordToWorldCoords (const vec2 &point) const
void getPanoramaPixelExtent (vec2 &topLeft, vec2 &bottomRight) const
const std::vector< GlSliceView * > & orthoViews () const
std::vector< GlSliceView * > & orthoViews ()
bool setOrthoViews (const std::vector< GlSliceView * > &views)
double orthoSliceRefPos () const
 Return reference position in curve coordinates.
void updateOrthoSlices ()
void updateOrthoViews ()
void setOrthoSliceRefPos (double pos)
 Updates reference position so that the given slice will be at pos (in curve coordinates).
void moveOrthoSlicePos (double dp)
 Move the reference position by a certain amount (in world coordinates).
int addOrthoSlice (double offset)
 Add orthoslice which has a specified ofsset with respect to the refernce slice in world coordinates.
void removeOrthoSlice (int slice)
 Remove the given orthogonal slice.
int numOrthoSlices () const
 Return the current number of orthogonal slices.
void setOrthoSliceOffset (int slice, double offset)
 Set the slice offset in world coordinates.
double orthoSliceOffset (int slice)
 Get the slice offset in world coordinates.
double orthoSlicePos (int slice) const
 Return slice position in curve coordinates.
void computeAnnotationVertices (vec2 &p1_, vec2 &p2_, int slice) const
CurvedViewPrimitivecurvedViewPrimitive () const
Public Member Functions inherited from ImFusion::GlView
virtual void setMatrix (const mat4 &mat)
 Sets the view matrix (view coordinates to world coordinates).
virtual const mat4 & matrix () const
 Returns the current view matrix (view coordinates to world coordinates).
virtual void resize (int width, int height)
 Set a new viewport size for this view.
virtual const GL::OrderIndependentTransparencyorderIndependentTransparency () const
 Returns the optional OIT manager instance of the view if the feature is supported and enabled.
int height () const
 Current viewport height of the view.
int width () const
 Current viewport width of the view.
void addObject (GlObject *object)
 Register a renderable scene object to be drawn by this GlView.
void removeObject (const GlObject *object)
 Unregister a previously added scene object drawn by this view.
const std::vector< GlObject * > & objects () const
 Returns all currently registered GlObjects of this view.
const GL::ViewStatestate () const
 Return the view state that was set during the last render() call.

Protected Attributes

std::unique_ptr< GlCurvedSlice > m_curvedSlice
std::vector< GlSliceView * > m_orthoViews
double m_orthoSliceRefPos = 0.0
CurvedViewPrimitivem_curvedViewPrimitive
double m_scale = 1.0
double m_zoom = 1.0
bool m_showIntersectionLines = true
std::vector< OrthoSliceInfom_orthoSlicePositions
Protected Attributes inherited from ImFusion::GlView
std::vector< GlObject * > m_objects
 Other objects to consider during rendering.
mat4 m_matrix = mat4::Identity()
 Matrix converting view coordinates to world coords (inverse of a traditional OpenGL view matrix).
GL::ViewState m_state
 OpenGL state describing viewport, projection and model-view matrix of last render call.
int m_width = 0
int m_height = 0

Additional Inherited Members

Public Types inherited from ImFusion::GlView
enum  Type { SLICE2D = 0 , SLICE3D = 1 , SPACE3D = 2 , OTHER = 3 }
 Type of the view. More...
Protected Member Functions inherited from ImFusion::GlView
GL::OrderIndependentTransparencysharedOitInstance () const
 Offers support for GlViews sharing GL::OrderIndependentTransparency instances to reduce GPU memory consumption.

Member Function Documentation

◆ render()

bool ImFusion::GlCurvedView::render ( )
overridevirtual

Render the view.

Implements ImFusion::GlView.

◆ type()

Type ImFusion::GlCurvedView::type ( ) const
overridevirtual

Return view type as 2D or 3D slice.

Implements ImFusion::GlView.

◆ setOrthoSliceRefPos()

void ImFusion::GlCurvedView::setOrthoSliceRefPos ( double pos)

Updates reference position so that the given slice will be at pos (in curve coordinates).

The position will be automatically restricted so that no ortho slice leaves the curves.

Parameters
posnew slice pos

◆ moveOrthoSlicePos()

void ImFusion::GlCurvedView::moveOrthoSlicePos ( double dp)

Move the reference position by a certain amount (in world coordinates).

Parameters
dpamount to move

◆ removeOrthoSlice()

void ImFusion::GlCurvedView::removeOrthoSlice ( int slice)

Remove the given orthogonal slice.

Parameters
sliceslice id

◆ setOrthoSliceOffset()

void ImFusion::GlCurvedView::setOrthoSliceOffset ( int slice,
double offset )

Set the slice offset in world coordinates.

Parameters
sliceslice id
offsetnew slice offset

◆ orthoSliceOffset()

double ImFusion::GlCurvedView::orthoSliceOffset ( int slice)

Get the slice offset in world coordinates.

Parameters
sliceslice id
Returns
slice offset

The documentation for this class was generated from the following file:
  • ImFusion/GL/GlCurvedView.h
Search Tab / S to search, Esc to close