ALBA
|
#include <albaGizmoInterface.h>
Public Types | |
enum | MODALITY { G_LOCAL = 0 , G_GLOBAL } |
Public Member Functions | |
void | SetName (albaString name) |
albaString | GetName () |
virtual void | SetInput (albaVME *vme) |
albaVME * | GetInput () |
void | SetMediator (albaObserver *mediator) |
albaObserver * | GetMediator () |
void | SetAutoscale (bool autoscale) |
bool | GetAutoscale () |
void | SetRenderWindowHeightPercentage (double percentage) |
double | GetRenderWindowHeightPercentage () |
void | SetAlwaysVisible (bool alwaysVisible) |
bool | GetAlwaysVisible () |
void | SetListener (albaObserver *listener) |
albaObserver * | GetListener () |
virtual void | OnEvent (albaEventBase *alba_event) |
virtual void | Show (bool show) |
void | SetModalityToLocal () |
void | SetModalityToGlobal () |
int | GetModality () |
virtual void | SetAbsPose (albaMatrix *absPose) |
virtual albaMatrix * | GetAbsPose () |
virtual albaGUI * | GetGui () |
Public Member Functions inherited from albaObserver | |
albaObserver () | |
virtual | ~albaObserver () |
virtual void | OnEvent (albaEventBase *e)=0 |
Protected Member Functions | |
albaGizmoInterface () | |
virtual | ~albaGizmoInterface () |
void | SendTransformMatrix (albaMatrix *matrix, int eventId, long arg) |
virtual void | OnEventGizmoGui (albaEventBase *alba_event) |
virtual void | OnEventGizmoComponents (albaEventBase *alba_event) |
Protected Attributes | |
albaObserver * | m_Mediator |
albaString | m_Name |
albaVME * | m_InputVME |
int | m_Modality |
albaObserver * | m_Listener |
albaVME * | m_RefSysVME |
bool | m_Visibility |
double | m_RenderWindowHeightPercentage |
bool | m_AlwaysVisible |
bool | m_Autoscale |
Friends | |
class | albaGizmoInterfaceTest |
Base class for operations and views gizmos.
This class defines the interface for gizmos that can be plugged into a view or into an operation
Definition at line 45 of file albaGizmoInterface.h.
Set the gizmo working modality.
Enumerator | |
---|---|
G_LOCAL | |
G_GLOBAL |
Definition at line 118 of file albaGizmoInterface.h.
|
protected |
|
protectedvirtual |
|
inline |
Set the gizmo name.
Definition at line 51 of file albaGizmoInterface.h.
|
inline |
Get the gizmo name.
Definition at line 55 of file albaGizmoInterface.h.
|
virtual |
Set input vme for the gizmo: gizmo are tools used to manipulate VMEs and this variable holds a reference to the controlled VME.
Can be used also to initialize gizmo dimensions and position
Reimplemented in albaGizmoCrossRotate, albaGizmoCrossRotateAxis, albaGizmoCrossRotateFan, albaGizmoCrossRotateTranslate, albaGizmoCrossTranslate, albaGizmoCrossTranslateAxis, albaGizmoCrossTranslatePlane, albaGizmoInteractionDebugger, albaGizmoPath, albaGizmoPathRuler, albaGizmoPolylineGraph, albaGizmoROI, albaGizmoRotate, albaGizmoRotateCircle, albaGizmoRotateFan, albaGizmoScale, albaGizmoScaleAxis, albaGizmoScaleIsotropic, albaGizmoSlice, albaGizmoTranslate, albaGizmoTranslateAxis, and albaGizmoTranslatePlane.
albaVME * albaGizmoInterface::GetInput | ( | ) |
|
inline |
Set the orchestrator object: albaGizmo's are used togetheter in more complex objects like albaGizmoRotate, albaGizmoTranslate ,... The master gizmo act as mediator (see GOF mediator pattern) between single albaVMEGizmos.
The optional mediator ivar holds a reference to the orchestrator if needed by the client. For example see albaGizmoTranslate which act as mediator between 3 albaGizmoTranslateAxis and 3 albaGizmoTranslatePlane each one wrapping several albaVMEGizmo's
Definition at line 71 of file albaGizmoInterface.h.
|
inline |
Return the meditor object.
Definition at line 74 of file albaGizmoInterface.h.
|
inline |
Enable/Disable gizmo autoscaling (default is false ie no autoscaling): if autoscale is enabled the gizmo will maintain a fixed dimension trying to follow camera zoom.
Use SetRenderWindowHeightPercentage to set gizmo / renderWindowHeight fixed ratio
Definition at line 78 of file albaGizmoInterface.h.
|
inline |
Get if gizmo autoscaling is enabled.
Definition at line 81 of file albaGizmoInterface.h.
|
inline |
Set the size of the gizmo when autoscale is enabled.
The size is expressed as gizmoHeight / renderWindowHeight. Max size is 1 (gizmo height equal to the render window one). This setting has no effect when autoscale is off
Definition at line 85 of file albaGizmoInterface.h.
|
inline |
Definition at line 86 of file albaGizmoInterface.h.
|
inline |
Put the gizmo on the superimposed layer ie make it always visible (default to false)
Definition at line 89 of file albaGizmoInterface.h.
|
inline |
Definition at line 90 of file albaGizmoInterface.h.
void albaGizmoInterface::SetListener | ( | albaObserver * | listener | ) |
Set the event receiver object.
albaObserver * albaGizmoInterface::GetListener | ( | ) |
|
virtual |
Events handling (not implemented)
Implements albaObserver.
Reimplemented in albaGizmoCrossRotate, albaGizmoCrossRotateAxis, albaGizmoCrossRotateFan, albaGizmoCrossRotateTranslate, albaGizmoCrossTranslate, albaGizmoCrossTranslateAxis, albaGizmoCrossTranslatePlane, albaGizmoInteractionDebugger, albaGizmoPath, albaGizmoPathRuler, albaGizmoPolylineGraph, albaGizmoROI, albaGizmoRotate, albaGizmoRotateCircle, albaGizmoRotateFan, albaGizmoScale, albaGizmoScaleAxis, albaGizmoScaleIsotropic, albaGizmoSlice, albaGizmoTranslate, albaGizmoTranslateAxis, and albaGizmoTranslatePlane.
|
virtual |
Show the gizmo (not implemented)
Reimplemented in albaGizmoCrossRotate, albaGizmoCrossRotateAxis, albaGizmoCrossRotateFan, albaGizmoCrossRotateTranslate, albaGizmoCrossTranslate, albaGizmoCrossTranslateAxis, albaGizmoCrossTranslatePlane, albaGizmoInteractionDebugger, albaGizmoPath, albaGizmoPathRuler, albaGizmoPolylineGraph, albaGizmoROI, albaGizmoRotate, albaGizmoRotateCircle, albaGizmoRotateFan, albaGizmoScale, albaGizmoScaleAxis, albaGizmoScaleIsotropic, albaGizmoSlice, albaGizmoTranslate, albaGizmoTranslateAxis, and albaGizmoTranslatePlane.
void albaGizmoInterface::SetModalityToLocal | ( | ) |
(default) Modality to be used when gizmo reference frame is the input vme abs pose: using this modality gizmo abs pose will change during the interaction.
See albaGizmoTranslate behavior with local (default) vs a different (global) refsys in albaOpTransformOld for a Local vs Global use case
void albaGizmoInterface::SetModalityToGlobal | ( | ) |
Modality to be used when gizmo reference frame is different from input vme abs pose.
int albaGizmoInterface::GetModality | ( | ) |
Return the working modality.
|
virtual |
Set the gizmo abs pose (not implemented)
Reimplemented in albaGizmoCrossRotateAxis, albaGizmoCrossRotateFan, albaGizmoCrossRotateTranslate, albaGizmoCrossTranslateAxis, albaGizmoCrossTranslatePlane, albaGizmoPathRuler, albaGizmoRotateCircle, albaGizmoRotateFan, albaGizmoScaleAxis, albaGizmoScaleIsotropic, albaGizmoTranslateAxis, and albaGizmoTranslatePlane.
|
virtual |
Get the gizmo abs pose.
Reimplemented in albaGizmoCrossRotate, albaGizmoCrossRotateAxis, albaGizmoCrossRotateTranslate, albaGizmoCrossTranslate, albaGizmoCrossTranslateAxis, albaGizmoCrossTranslatePlane, albaGizmoPath, albaGizmoRotate, albaGizmoRotateCircle, albaGizmoScale, albaGizmoScaleAxis, albaGizmoScaleIsotropic, albaGizmoTranslate, albaGizmoTranslateAxis, and albaGizmoTranslatePlane.
|
virtual |
Return gui owned by the gizmo.
Reimplemented in albaGizmoCrossRotate, albaGizmoCrossTranslate, albaGizmoInteractionDebugger, albaGizmoPathRuler, albaGizmoRotate, albaGizmoScale, and albaGizmoTranslate.
|
protected |
|
inlineprotectedvirtual |
Gizmo components events handling.
Reimplemented in albaGizmoCrossRotate, albaGizmoCrossTranslate, albaGizmoPathRuler, albaGizmoRotate, albaGizmoScale, and albaGizmoTranslate.
Definition at line 187 of file albaGizmoInterface.h.
|
inlineprotectedvirtual |
Gizmo components events handling.
Reimplemented in albaGizmoCrossRotate, albaGizmoCrossTranslate, albaGizmoPathRuler, albaGizmoROI, albaGizmoRotate, albaGizmoScale, and albaGizmoTranslate.
Definition at line 190 of file albaGizmoInterface.h.
|
friend |
Test friend.
Definition at line 193 of file albaGizmoInterface.h.
|
protected |
Definition at line 152 of file albaGizmoInterface.h.
|
protected |
Definition at line 154 of file albaGizmoInterface.h.
|
protected |
The input vme.
Definition at line 158 of file albaGizmoInterface.h.
|
protected |
The gizmo interaction mode.
Definition at line 162 of file albaGizmoInterface.h.
|
protected |
Register the event receiver object.
Definition at line 166 of file albaGizmoInterface.h.
|
protected |
Vme to be used as reference system.
Definition at line 170 of file albaGizmoInterface.h.
|
protected |
Definition at line 173 of file albaGizmoInterface.h.
|
protected |
gizmoHeight / RenderWindowHeight in autoscale mode
Definition at line 176 of file albaGizmoInterface.h.
|
protected |
Gimzo always visible ie on the superimposed layer.
Definition at line 179 of file albaGizmoInterface.h.
|
protected |
Gizmo autoscale.
Definition at line 182 of file albaGizmoInterface.h.