16#ifndef __albaInteractor2DAngle_h
17#define __albaInteractor2DAngle_h
21#include "vtkALBATextActorMeter.h"
31class vtkPolyDataMapper2D;
58 ANGLE_BETWEEN_LINES = 0,
98 return m_Measure[m_Measure.size()-1];
114 return albaString(m_MeterVector[m_MeterVector.size()-1]->GetText());
207 double m_PickedPoint[3];
215 friend class albaInteractor2DAngleTest;
Event class to transport a triggering button and a position from pointing devices.
Class implementing an interactor for creating 2D measure tool.
void SetMeasureType(int t)
Set the type of the measure, selectable from DISTANCE_BETWEEN_POINTS, DISTANCE_BETWEEN_LINES and ANGL...
void SetManualAngle(double manualAngle)
Set manually the angle.
void ShowOnlyLastMeasure(bool show)
Show On/Off only last measure.
virtual void OnButtonDown(albaEventInteraction *e)
Perform a pick on start of interaction to find if the user pointed an object in the scene,...
virtual void OnMiddleButtonUp(albaEventInteraction *e)
bool GetRegisterMeasure()
Get the boolean value of end measure.
std::vector< vtkPolyDataMapper2D * > m_LineMapperVector2
virtual void OnRightButtonDown(albaEventInteraction *e)
std::vector< int > m_FlagMeasureType
vtkCoordinate * m_Coordinate
vtkRenderer * m_LastRenderer
Renderer used for the first line.
albaDeviceButtonsPadMouse * m_Mouse
virtual ~albaInteractor2DAngle()
std::vector< vtkPolyDataMapper2D * > m_LineMapperVector1
albaVME * m_ProbedVME
VME probed by the m_ProbingLine.
double GetLastAngle()
Get Last Angle.
virtual void OnMiddleButtonDown(albaEventInteraction *e)
void CalculateMeasure()
Calculate the measure according to the measure type selected.
albaString GetLabel()
Get the label.
std::vector< vtkLineSource * > m_LineSourceVector1
vtkPolyDataMapper2D * m_LineMapper2
vtkRenderer * m_PreviousRenderer
bool m_DisableUndoAndOkCancel
std::vector< vtkALBATextActorMeter * > m_MeterVector
vtkLineSource * m_Line2
Second line of the measure tool (used for angle measures)
virtual void OnLeftButtonUp(albaEventInteraction *e)
int SizeMeasureVector()
Return the dimension of Measure Vector.
vtkLineSource * m_ProbingLine
std::vector< double > m_Measure
std::vector< vtkActor2D * > m_LineActorVector2
void SetLabel(albaString label)
Set the label.
void DrawMeasureTool(double x, double y)
Draw the measure tool according to the measure type selected.
virtual void OnRightButtonUp(albaEventInteraction *e)
vtkLineSource * m_Line
First line of the measure tool.
void SetColor(double r, double g, double b)
virtual void OnLeftButtonDown(albaEventInteraction *e)
vtkActor2D * m_LineActor2
virtual void OnMove(albaEventInteraction *e)
vtkRenderer * m_CurrentRenderer
albaRWIBase * m_CurrentRwi
albaRWIBase * GetCurrentRwi()
return the current rwi
bool IsDisableUndoAndOkCancel()
Control if disabling various buttons.
vtkPolyDataMapper2D * m_LineMapper
std::vector< vtkLineSource * > m_LineSourceVector2
virtual void OnButtonUp(albaEventInteraction *e)
void UndoMeasure()
Undo the last measure.
std::vector< vtkRenderer * > m_RendererVector
void RemoveMeter()
Remove the meters from the render window.
albaTypeMacro(albaInteractor2DAngle, albaInteractorPER)
void SetMeasureTypeToAngleBetweenPoints()
Set the type of the measure to ANGLE_BETWEEN_POINTS.
virtual void OnChar(albaEventInteraction *e)
void SetMeasureTypeToAngleBetweenLines()
Set the type of the measure to ANGLE_BETWEEN_LINES.
void ShowAllMeasures(bool show)
Show On/Off all measures.
std::vector< vtkActor2D * > m_LineActorVector1
Class implementing routing of events based on picking.
albaRWIBase is a vtkRenderWindowInteractor placed on a wxWindow
albaString - performs common string operations on c-strings.