ImFusion SDK 4.3
BoxAnnotationManipulator Class Reference

#include <ImFusion/GUI/BoxAnnotationManipulator.h>

Manipulator for box annotations. More...

+ Inheritance diagram for BoxAnnotationManipulator:

Detailed Description

Manipulator for box annotations.

Public Types

enum  InteractionMode {
  InteractionNone = 0 , InteractionCreate = 1 , InteractionMoveCorner = 2 , InteractionMoveEdge = 4 ,
  InteractionMoveSide = 8 , InteractionMoveCenter = 16 , InteractionScale = 32 , InteractionRotate = 64
}
 
enum  CursorMode {
  CursorDefault = 0 , CursorHorizontal = 1 , CursorVertical = 2 , CursorAll = 4 ,
  CursorDiagonalIncrease = 8 , CursorDiagonalDecrease = 16 , CursorCrosshair = 32
}
 

Public Member Functions

 BoxAnnotationManipulator (GlBox &annotation)
 
bool sceneEvent (QEvent *event, const GlView &view) override
 
void setInteractionMode (InteractionMode mode, bool=true)
 
InteractionMode interactionMode () const
 
void beginCreate ()
 Reset the current box and let's the user redefine it.
 
void endCreate ()
 Cancels the user creation of the box.
 
void setAdjustToViewAxis (bool enable)
 Adjust the orientation of the box to the axis of the view.
 
bool adjustToViewAxis () const
 
void setDefaultOrientation (mat3 orientation)
 Sets the default orientation of box when created by the user.
 
mat3 defaultOrientation () const
 
const std::vector< vec3 > & points () const
 
bool requiresFocus () override
 Derived classes that need priority scene events can override this.
 
CursorMode currentCursor () const
 
void setInteractiveAnnotation (InteractiveAnnotation *annot)
 
- Public Member Functions inherited from Manipulator
void addListener (ManipulatorListener *listener)
 
void removeListener (const ManipulatorListener *listener)
 
virtual void openContextMenu (QPoint pos, QPoint globalPos, Qt::KeyboardModifiers modifiers)
 
GUI::EventResult handleInputEvent (const GUI::InputEvent &event, const GUI::View &view) override
 This function is called by sources of input events in order to dispatch them to the handlers.
 

Additional Inherited Members

- Protected Member Functions inherited from Manipulator
void notifyListeners (void *eventData)
 

Member Function Documentation

◆ sceneEvent()

bool sceneEvent ( QEvent * event,
const GlView & view )
overridevirtual

Implements Manipulator.

◆ endCreate()

void endCreate ( )

Cancels the user creation of the box.

If the user didn't define any points yet, the box will have a default size.

◆ setAdjustToViewAxis()

void setAdjustToViewAxis ( bool enable)

Adjust the orientation of the box to the axis of the view.

If set, the box will always be aligned to the current axis of the view it is created in, e.g. the box will be aligned to the screen axes. Otherwise the box uses the defaultOrientation. This only has an effect when the annotation is created. Enabled by default.

◆ setDefaultOrientation()

void setDefaultOrientation ( mat3 orientation)

Sets the default orientation of box when created by the user.

This only has an effect if adjustToViewAxis is disabled. By default, the orientation is mat3::Identity(), i.e. the box will be axis-aligned to the world coordinate system.

◆ requiresFocus()

bool requiresFocus ( )
inlineoverridevirtual

Derived classes that need priority scene events can override this.

By definition only one manipulator can get served first, so use with care.

Reimplemented from Manipulator.


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