18#ifndef __albaGizmoHandle_H__
19#define __albaGizmoHandle_H__
26#include "albaServiceClient.h"
27#include "albaAbsLogicManager.h"
37class vtkCylinderSource;
38class vtkTransformPolyDataFilter;
97 int constraintModality=BOUNDS,
albaVME *parent=NULL,
bool showShadingPlane =
false);
161 enum GIZMOTYPE {XMIN = 0, XMAX, YMIN, YMAX, ZMIN, ZMAX};
231 void SetColor(
double colR,
double colG,
double colB);
240 double m_BBCenters[6][3];
241 double m_TranslationIntervals[6][2];
256 double m_ShadingPlaneDimension[3];
266 friend class albaGizmoROITest;
267 friend class albaGizmoHandleTest;
Implementation of the message object for the Subject/Observer design pattern.
virtual void OnEvent(albaEventBase *alba_event)
Events handling.
void ShowShadingPlaneOff()
void SetLength(double length)
Set/Get the length of the handle The handle dimensions are: (Length) x (Length) ax (Length/2)
vtkCubeSource * m_Cube
Cube source.
void SetBBCenters(double bounds[6])
DEPRECATED: To be removed, use SetBounds instead.
vtkTransformPolyDataFilter * m_TranslateBoxPolyDataFilterEnd
translate PDF for box
void SetColor(double col[3])
Set the gizmo color.
albaMatrix m_PivotMatrix
The Pivot Matrix.
void SetListener(albaObserver *Listener)
Set the event receiver object.
void SetAbsPose(albaMatrix *absPose)
Set the gizmo abs pose.
albaMatrix * GetAbsPose()
Get the gizmo abs pose.
void SetPivotMatrix(albaMatrix &matrix)
DEPRECATED: To be removed! Set the pivot matrix.
albaMatrix * GetPose()
Get the gizmo abs pose.
virtual ~albaGizmoHandle()
void ShowShadingPlaneOn()
vtkTransform * m_TranslateBoxTrEnd
translation transform for box
void UpdateShadingPlaneDimension(double b[6])
Since handles position has changed shading plane bounds must be recomputed.
vtkTransform * m_TranslateShadingPlaneTrEnd
translation transform for box
vtkTransformPolyDataFilter * m_RotateBoxPolyDataFilter
rotate PDF for box
vtkTransformPolyDataFilter * m_TranslateShadingPlanePolyDataFilter
translate PDF for box
albaInteractorCompositorMouse * m_IsaComp
Interactor style compositor.
vtkPlaneSource * m_PlaneSource
void SetPose(albaMatrix *pose)
Set the gizmo local pose.
vtkPlane * m_ShadingPlane
vtkTransformPolyDataFilter * m_RotateShadingPlanePolyDataFilter
rotate PDF for box
albaVMEGizmo * m_ShadingPlaneGizmo
void CreatePipeline()
Create vtk objects needed.
vtkTransformPolyDataFilter * m_TranslateShadingPlanePolyDataFilterEnd
translate PDF for box
int GetType()
Return the gizmo's type.
void GetBounds(double bounds[6])
void SetTranslationIntervals(double bounds[6])
Set translation intervals.
void SetConstrainRefSys(albaMatrix *constrain)
Set the constrain ref sys.
vtkTransform * m_TranslateBoxTr
translation transform for box
vtkTransform * m_TranslateShadingPlaneTr
translation transform for box
albaVME * m_InputVme
Register input vme.
albaObserver * m_Listener
Register the event receiver object.
void GetHandleCenter(int type, double HandleCenter[3])
Return the center of the handle.
void SetColor(double colR, double colG, double colB)
Set the gizmo color.
void SetInput(albaVME *vme)
Set the gizmo generating vme; the gizmo will be centered on this vme.
vtkTransform * m_RotateShadingPlaneTr
rotation transform for box
void SetBounds(double bounds[6])
Update the handle position given the bounding box.
albaInteractorGenericMouse * m_IsaGen
Generic Interactor style.
vtkTransform * m_RotateBoxTr
rotation transform for box
albaVMEGizmo * m_BoxGizmo
albaMatrix & GetPivotMatrix()
DEPRECATED: To be removed! Get the pivot matrix.
bool GetShowShadingPlaneOn()
albaObserver * GetListener()
Get the event receiver object.
void Show(bool show)
Show the gizmo.
void SetType(int type)
Set the gizmo type.
void Highlight(bool highlight)
Highlight the gizmo: this change its color to yellow.
void ShowShadingPlane(bool show)
Show shading plane.
void GetColor(double color[3])
Get the gizmo color.
albaGizmoHandle(albaVME *input, albaObserver *listener=NULL, int constraintModality=BOUNDS, albaVME *parent=NULL, bool showShadingPlane=false)
Create a handle, input vme must be different from NULL and default handle type is XMIN.
albaMatrix * GetConstrainRefSys()
Get the constrain ref sys.
vtkTransformPolyDataFilter * m_TranslateBoxPolyDataFilter
translate PDF for box
int m_GizmoType
Register the gizmo type.
Associates instances of albaInteractorGenericMouse to mouse buttons and ctrl/shift keys combinations.
Constrained interaction with mouse device.
albaMatrix - Time stamped 4x4 Matrix.
Interface implementing the Observer of the Subject/Observer design pattern.