36 bool mitk::ExampleInteractor::CheckPoint(
const InteractionEvent *interactionEvent)
41 if (positionEvent != NULL)
45 int retVal = m_PointSet->SearchPoint(point, epsilon);
53 bool mitk::ExampleInteractor::AddPoint(StateMachineAction *, InteractionEvent *interactionEvent)
58 InteractionPositionEvent *positionEvent =
dynamic_cast<InteractionPositionEvent *
>(interactionEvent);
59 if (positionEvent != NULL)
63 m_PointSet->InsertPoint(m_NumberOfPoints, point, 0);
65 GetDataNode()->SetData(m_PointSet);
66 GetDataNode()->Modified();
68 if (m_NumberOfPoints != 0 && m_NumberOfPoints >= m_MaximalNumberOfPoints)
73 positionEvent->GetSender()->GetDispatcher()->QueueEvent(event.GetPointer());
85 bool mitk::ExampleInteractor::EnoughPoints(StateMachineAction *, InteractionEvent *)
95 m_MaximalNumberOfPoints = 0;
107 std::string maxNumber;
108 properties->GetStringProperty(
"NumberOfPoints", maxNumber);
109 m_MaximalNumberOfPoints = atoi(maxNumber.c_str());
virtual ~ExampleInteractor()
Super class for all position events.
Point3D GetPositionInWorld() const
virtual void ConfigurationChanged()
itk::SmartPointer< Self > Pointer
static RenderingManager * GetInstance()
virtual void ConnectActionsAndFunctions()
Overwrite this function to connect actions from StateMachine description with functions.
#define CONNECT_CONDITION(a, f)
static Pointer New(BaseRenderer *_arga, DataInteractor *_argb, const std::string &_argc)
#define CONNECT_FUNCTION(a, f)
void RequestUpdateAll(RequestType type=REQUEST_UPDATE_ALL)