You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlowPost/PostGraphAdaptor/PostGraphWidgetLineCallBack...

21 lines
738 B
C++

#include "PostGraphWidgetLineCallBack.h"
#include <vtkLineWidget2.h>
#include <vtkLineRepresentation.h>
namespace Interface
{
void PostGraphWidgetLineCallBack::Execute(vtkObject * caller, unsigned long eventId, void * callData)
{
Q_UNUSED(eventId);
Q_UNUSED(callData);
vtkLineWidget2* widget = vtkLineWidget2::SafeDownCast(caller);
if (widget == nullptr)return;
vtkLineRepresentation* lineRep = vtkLineRepresentation::SafeDownCast(widget->GetRepresentation());
if (lineRep == nullptr)return;
double* startPoint = lineRep->GetPoint1WorldPosition();
double* endPoint = lineRep->GetPoint2WorldPosition();
emit sigValueChange(startPoint, endPoint);
}
}