ImFusion C++ SDK 4.4.0
ImFusion::GlInPlaneTransformer Class Reference
Inheritance diagram for ImFusion::GlInPlaneTransformer:

Public Member Functions

 GlInPlaneTransformer (double radius=15, const isom3 &offset=isom3::Identity(), bool contour=true)
void draw (const GlView &view) override
 Draw the object in 3D space.
Geometry::AlignedBox bounds () const override
 Get the axis-aligned bounding box of this GlObject in world space.
std::string typeName () const override
 Return unique identifier for this object class used for serialization.
bool isInside (const vec2 &pos, const GL::ViewState &state) override
void moveTo (const vec2 &pos, const vec2 &start, const GL::ViewState &state) override
Public Member Functions inherited from ImFusion::GlTransformerObject
 GlTransformerObject (const isom3 &offset=isom3::Identity(), bool drawContour=true)
isom3 offset () const
void setOffset (const isom3 &offset)
bool isHovering () const
void setHovering (bool hover)
const vec3 & center () const
virtual void activate (const vec2 &start, const GL::ViewState &state)
bool isActive () const
virtual void deactivate ()
virtual double distanceTo (const vec3 &val) const
virtual double distanceTo (const vec2 &pos, const GL::ViewState &state)
void configure (const Properties *p) override
 Configure this object instance by de-serializing the given Properties.
void configuration (Properties *p) const override
 Serialize the current object configuration into the given Properties object.
Public Member Functions inherited from ImFusion::GlObject
virtual Geometry::AlignedBox boundsSpherical () const
 Get the spherical bounds of this GlObject in world space.
virtual void setMatrix (const mat4 &m)
 Set the modelview matrix of this object.
virtual const mat4 & matrix () const
 Return the modelview matrix.
virtual void setVisible (bool visible)
 Set object visibility.
virtual bool visible () const
 Return object visibility.
virtual void setAlwaysVisible (bool alwaysVisible)
 Set if object is always visible.
virtual bool alwaysVisible () const
 Return if object is always visible.
RenderingOrderGroup renderingOrder () const
 Return current rendering order value for this GlObject.
void setRenderingOrder (RenderingOrderGroup group)
 Set rendering order value for this GlObject.
void setDraw3DIn2DView (bool draw3DIn2DView)
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

Parameter< double > p_radius = {"radius", 15, this}
Public Attributes inherited from ImFusion::GlTransformerObject
Parameter< vec3 > p_color = {"color", vec3::Ones(), this}
Parameter< vec3 > p_contourColor = {"contourColor", vec3::Zero(), this}
Parameter< vec3 > p_hoverColor = {"hoverColor", vec3::Constant(0.5), this}
Parameter< bool > p_drawContour = {"drawContour", true, this}
Public Attributes inherited from ImFusion::Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.

Protected Member Functions

std::optional< vec3 > project (const vec2 &pos, const GL::ViewState &state) const override
Protected Member Functions inherited from ImFusion::GlTransformerObject
virtual void setCenter (const vec3 &center)
virtual std::optional< vec3 > projectToPlane (const vec2 &pos, const Geometry::Plane &plane, const GL::ViewState &state) const
virtual vec3 getColor () const
virtual vec3 getColorContour () const
virtual void updatePoses (const GL::ViewState &state)
void drawLines (const std::vector< vec3 > &vertices, const vec3 &color, float lineWidth=1.0)
void drawLineStrip (const std::vector< vec3 > &vertices, const vec3 &color, float lineWidth=1.0)
void drawLineLoop (const std::vector< vec3 > &vertices, const vec3 &color, float lineWidth=1.0)
void drawTriangles (const std::vector< vec3 > &vertices, const vec3 &color)
void drawTriangleStrip (const std::vector< vec3 > &vertices, const vec3 &color)
void drawPoints (const std::vector< vec3 > &points, const vec3 &color, double pointSize=5.0)
void drawSphere (const vec3 &center, double radius, const vec3 &color)
void drawCircle (const vec3 &center, const vec3 &normal, double radius, const vec3 &color, bool contour)

Additional Inherited Members

Public Types inherited from ImFusion::GlObject
enum  RenderingOrderGroup { RenderingGroupRest , RenderingGroupMesh , RenderingGroupManipulator }
 Enumeration to determine rendering order of GlObjects in GlSliceView and GlVolumeView. More...
Static Protected Member Functions inherited from ImFusion::GlTransformerObject
static vec3 perpendicular (const vec3 &vector)
static double safe_acos (double value)
Protected Attributes inherited from ImFusion::GlTransformerObject
std::unique_ptr< GL::VertexBufferm_vbo
const GL::ViewStatem_viewState = nullptr
bool m_active = false
bool m_hover = false
isom3 m_offset = isom3::Identity()
std::optional< isom3 > m_pos
vec3 m_center = vec3::Zero()
std::optional< vec3 > m_camera
std::optional< vec3 > m_init
std::optional< vec3 > m_start
std::optional< vec3 > m_startOffset
Protected Attributes inherited from ImFusion::GlObject
mat4 m_matrix = mat4::Identity()
 Modelview transformation matrix of this object.
bool m_visible = true
 Object visibility.
bool m_alwaysVisible = false
 Object always visible.
bool m_draw3DIn2DView
 Draw 3D objects in 2D views. This is to render 3D objects in projective 2D views. Property is not serialized.
RenderingOrderGroup m_renderingOrder = RenderingGroupRest
Protected Attributes inherited from ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Member Function Documentation

◆ draw()

void ImFusion::GlInPlaneTransformer::draw ( const GlView & view)
overridevirtual

Draw the object in 3D space.

Implements ImFusion::GlObject.

◆ bounds()

Geometry::AlignedBox ImFusion::GlInPlaneTransformer::bounds ( ) const
overridevirtual

Get the axis-aligned bounding box of this GlObject in world space.

Return an empty (default-constructed) AlignedBox object if the GlObject does not reside in world space.

Implements ImFusion::GlObject.

◆ typeName()

std::string ImFusion::GlInPlaneTransformer::typeName ( ) const
overridevirtual

Return unique identifier for this object class used for serialization.

Implements ImFusion::GlObject.

◆ isInside()

bool ImFusion::GlInPlaneTransformer::isInside ( const vec2 & pos,
const GL::ViewState & state )
overridevirtual

◆ moveTo()

void ImFusion::GlInPlaneTransformer::moveTo ( const vec2 & pos,
const vec2 & start,
const GL::ViewState & state )
overridevirtual

◆ project()

std::optional< vec3 > ImFusion::GlInPlaneTransformer::project ( const vec2 & pos,
const GL::ViewState & state ) const
overrideprotectedvirtual

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