ImFusion SDK 4.3
GlCurvedView Class Reference

#include <ImFusion/GL/GlCurvedView.h>

Curved slice view. More...

+ Inheritance diagram for 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 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)
 Add a reference to a GlObject to be drawn by this view.
 
void removeObject (GlObject *object)
 Remove a reference to a GlObject drawn by this view.
 
const std::vector< GlObject * > & objects () const
 Return the set of GlObjects that are drawn by 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 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 GlView
enum  Type { SLICE2D = 0 , SLICE3D = 1 , SPACE3D = 2 , OTHER = 3 }
 Type of the view. More...
 
- Protected Member Functions inherited from GlView
GL::OrderIndependentTransparencysharedOitInstance () const
 Offers support for GlViews sharing GL::OrderIndependentTransparency instances to reduce GPU memory consumption.
 

Member Function Documentation

◆ render()

bool render ( )
overridevirtual

Render the view.

Implements GlView.

◆ type()

Type type ( ) const
overridevirtual

Return view type as 2D or 3D slice.

Implements GlView.

◆ setOrthoSliceRefPos()

void 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 moveOrthoSlicePos ( double dp)

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

Parameters
dpamount to move

◆ removeOrthoSlice()

void removeOrthoSlice ( int slice)

Remove the given orthogonal slice.

Parameters
sliceslice id

◆ setOrthoSliceOffset()

void setOrthoSliceOffset ( int slice,
double offset )

Set the slice offset in world coordinates.

Parameters
sliceslice id
offsetnew slice offset

◆ orthoSliceOffset()

double 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:
Search Tab / S to search, Esc to close