![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GL/CurvedViewPrimitive.h>
Interface for curved view primitives. More...
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. | |
![]() | |
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 |
![]() | |
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 |
![]() | |
std::vector< Param > | m_params |
List of all registered Parameter and SubProperty instances. | |
|
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.
t | curve parameter |
res | position at t (output parameter) |
Implemented in GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.
|
pure virtual |
Evaluates primitive normal direction.
The curve is parametrized in the range t = [0;1]
t | curve parameter |
res | normalized normal direction at t (output parameter) |
Implemented in GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.
|
pure virtual |
Evaluates primitive tangent direction.
The curve is parametrized in the range t = [0;1]
t | curve parameter |
res | normalized tangent direction at t (output parameter) |
Implemented in GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.
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.
|
pure virtual |
Update the normal of the primitive.
Implemented in GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.
|
pure virtual |
Get the length of the primitive.
Implemented in GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.
|
pure virtual |
Get the sample points of the primitive.
Implemented in GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.
|
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.
pos | worldspace position of a point on the view |
Implemented in GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.
|
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.
|
overridevirtual |
Set one or multiple properties.
Reimplemented from Configurable.
Reimplemented in GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.
|
overridevirtual |
Retrieve the properties of this object.
Reimplemented from Configurable.
Reimplemented in GlCurvedViewCircle, GlCurvedViewEllipse, GlCurvedViewPolyLine, and GlCurvedViewSpline.