ImFusion SDK 4.3
CurvedViewPrimitive Class Referenceabstract

#include <ImFusion/GL/CurvedViewPrimitive.h>

Interface for curved view primitives. More...

+ Inheritance diagram for 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 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
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Public Attributes

Signal signalGeometryChanged
 
- Public Attributes inherited from 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 Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ evaluate()

virtual void 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 GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.

◆ evaluateNormal()

virtual void 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 GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.

◆ evaluateTangent()

virtual void 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 GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.

◆ yDir()

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.

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

◆ updateYDir()

virtual void updateYDir ( )
pure virtual

Update the normal of the primitive.

Implemented in GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.

◆ getCurveLength()

virtual double getCurveLength ( ) const
pure virtual

Get the length of the primitive.

Implemented in GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.

◆ getUniformSamples()

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

Get the sample points of the primitive.

Implemented in GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.

◆ calculateNearestPointCoord()

virtual double 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 GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.

◆ isClosed()

virtual bool 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 GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.

◆ configure()

void configure ( const Properties * p)
overridevirtual

Set one or multiple properties.

Reimplemented from Configurable.

Reimplemented in GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.

◆ configuration()

void configuration ( Properties * p) const
overridevirtual

Retrieve the properties of this object.

Reimplemented from Configurable.

Reimplemented in GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close