ImFusion C++ SDK 4.4.0
ImFusion::CurvedViewPrimitive Class Referenceabstract

#include <ImFusion/GL/CurvedViewPrimitive.h>

Interface for curved view primitives. More...

Inheritance diagram for ImFusion::CurvedViewPrimitive:

Detailed Description

Interface for curved view primitives.

Annotations which want to support rendering a curved MPR view of themselves must implement this interface. It provides generic methods which allow the panorama view to define the curved MPR trajectory inside a volume regardless of the details of the underlying annotation.

Public Member Functions

virtual void evaluate (double t, vec3 &res) const =0
 Return a point on the primitive.
virtual void evaluateNormal (double t, vec3 &res) const =0
 Evaluates primitive normal direction.
virtual void evaluateTangent (double t, vec3 &res) const =0
 Evaluates primitive tangent direction.
vec3 yDir () const
 Get the y-direction of the primitive The y-direction is defined as the normal of the plane in which the primitive is located.
virtual void updateYDir ()=0
 Update the normal of the primitive.
void overrideCurvedSliceYDir (const vec3 &yDir, bool forcedYDir=true)
bool forcedYDir (vec3 &yDirOut) const
void updateCurveHeight (const SharedImageSet *imgSet)
 Update height of the primitive.
virtual double getCurveLength () const =0
 Get the length of the primitive.
virtual double coordToArcLength (double t) const =0
virtual double arcLengthToCoord (double length) const =0
virtual void getUniformSamples (std::vector< std::pair< double, vec3 > > &samples, int n) const =0
 Get the sample points of the primitive.
virtual double calculateNearestPointCoord (const vec3 &pos) const =0
 Calculates the curve parameter t of the point nearest to pos.
virtual bool isClosed () const =0
 Returns true if the curve is closed (i.e. first point is at the same position as the last point).
double curveHeight () const
void configure (const Properties *p) override
 Set one or multiple properties.
void configuration (Properties *p) const override
 Retrieve the properties of this object.
Public Member Functions inherited from ImFusion::Configurable
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 Configurable (const Configurable &rhs)
 Configurable (Configurable &&rhs) noexcept
Configurable & operator= (const Configurable &)
Configurable & operator= (Configurable &&) noexcept

Public Attributes

Signal signalGeometryChanged
Public Attributes inherited from ImFusion::Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.

Protected Member Functions

Geometry::AlignedBox extendBounds (const Geometry::AlignedBox &b) const

Protected Attributes

vec3 m_yDir = vec3(0, 0, 1)
std::optional< vec3 > m_forcedYDir
double m_curveHeight = 0.0
Protected Attributes inherited from ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Member Function Documentation

◆ evaluate()

virtual void ImFusion::CurvedViewPrimitive::evaluate ( double t,
vec3 & res ) const
pure virtual

Return a point on the primitive.

The primitive is parametrized in the range t = [0;1] which linearly maps to the entire length of the primitive.

Parameters
tcurve parameter
resposition at t (output parameter)

Implemented in ImFusion::GlCurvedViewCircle, ImFusion::GlCurvedViewEllipse, ImFusion::GlCurvedViewPolyLine, and ImFusion::GlCurvedViewSpline.

◆ evaluateNormal()

virtual void ImFusion::CurvedViewPrimitive::evaluateNormal ( double t,
vec3 & res ) const
pure virtual

Evaluates primitive normal direction.

The curve is parametrized in the range t = [0;1]

Parameters
tcurve parameter
resnormalized normal direction at t (output parameter)

Implemented in ImFusion::GlCurvedViewCircle, ImFusion::GlCurvedViewEllipse, ImFusion::GlCurvedViewPolyLine, and ImFusion::GlCurvedViewSpline.

◆ evaluateTangent()

virtual void ImFusion::CurvedViewPrimitive::evaluateTangent ( double t,
vec3 & res ) const
pure virtual

Evaluates primitive tangent direction.

The curve is parametrized in the range t = [0;1]

Parameters
tcurve parameter
resnormalized tangent direction at t (output parameter)

Implemented in ImFusion::GlCurvedViewCircle, ImFusion::GlCurvedViewEllipse, ImFusion::GlCurvedViewPolyLine, and ImFusion::GlCurvedViewSpline.

◆ yDir()

vec3 ImFusion::CurvedViewPrimitive::yDir ( ) const

Get the y-direction of the primitive The y-direction is defined as the normal of the plane in which the primitive is located.

Warning
: this will in general correspond to the y-coordinate in the curved view, not the normal to the curved view.

◆ updateYDir()

virtual void ImFusion::CurvedViewPrimitive::updateYDir ( )
pure virtual

◆ getCurveLength()

virtual double ImFusion::CurvedViewPrimitive::getCurveLength ( ) const
pure virtual

◆ getUniformSamples()

virtual void ImFusion::CurvedViewPrimitive::getUniformSamples ( std::vector< std::pair< double, vec3 > > & samples,
int n ) const
pure virtual

◆ calculateNearestPointCoord()

virtual double ImFusion::CurvedViewPrimitive::calculateNearestPointCoord ( const vec3 & pos) const
pure virtual

Calculates the curve parameter t of the point nearest to pos.

First the nearest point to pos on the curve is determined and the parameter t from the start of the curve to this point returned.

Parameters
posworldspace position of a point on the view

Implemented in ImFusion::GlCurvedViewCircle, ImFusion::GlCurvedViewEllipse, ImFusion::GlCurvedViewPolyLine, and ImFusion::GlCurvedViewSpline.

◆ isClosed()

virtual bool ImFusion::CurvedViewPrimitive::isClosed ( ) const
pure virtual

Returns true if the curve is closed (i.e. first point is at the same position as the last point).

Implemented in ImFusion::GlCurvedViewCircle, ImFusion::GlCurvedViewEllipse, ImFusion::GlCurvedViewPolyLine, and ImFusion::GlCurvedViewSpline.

◆ configure()

void ImFusion::CurvedViewPrimitive::configure ( const Properties * p)
overridevirtual

◆ configuration()

void ImFusion::CurvedViewPrimitive::configuration ( Properties * p) const
overridevirtual

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