ImFusion SDK 4.3
GlTransformerObject Class Referenceabstract
+ Inheritance diagram for GlTransformerObject:

Public Member Functions

 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 bool isInside (const vec2 &pos, const GL::ViewState &state)=0
 
virtual void moveTo (const vec2 &pos, const vec2 &start, const GL::ViewState &state)=0
 
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 GlObject
virtual void draw (const GlView &view)=0
 Draw the object in 3D space.
 
virtual Geometry::AlignedBox bounds () const =0
 Get the axis-aligned bounding box of this GlObject in world space.
 
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.
 
virtual std::string typeName () const =0
 Return unique identifier for this object class used for serialization.
 
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 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

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 Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 

Protected Member Functions

virtual void setCenter (const vec3 &center)
 
virtual std::optional< vec3 > project (const vec2 &pos, const GL::ViewState &state) const =0
 
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)
 

Static Protected Member Functions

static vec3 perpendicular (const vec3 &vector)
 
static double safe_acos (double value)
 

Protected Attributes

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 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 Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Additional Inherited Members

- Public Types inherited from GlObject
enum  RenderingOrderGroup { RenderingGroupRest , RenderingGroupMesh , RenderingGroupManipulator }
 Enumeration to determine rendering order of GlObjects in GlSliceView and GlVolumeView. More...
 

Member Function Documentation

◆ configure()

void configure ( const Properties * p)
overridevirtual

Configure this object instance by de-serializing the given Properties.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configuration() for the inverse functionality

Reimplemented from GlObject.

◆ configuration()

void configuration ( Properties * p) const
overridevirtual

Serialize the current object configuration into the given Properties object.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configure() for the inverse functionality

Reimplemented from GlObject.


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