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.
|
|
|
|
#include "PostGraphWidgetPlaneCallBack.h"
|
|
|
|
|
|
|
|
|
|
#include <vtkImplicitPlaneWidget2.h>
|
|
|
|
|
#include <vtkImplicitPlaneRepresentation.h>
|
|
|
|
|
|
|
|
|
|
namespace Interface
|
|
|
|
|
{
|
|
|
|
|
void PostGraphWidgetPlaneCallBack::Execute(vtkObject * caller, unsigned long eventId, void * callData)
|
|
|
|
|
{
|
|
|
|
|
Q_UNUSED(eventId);
|
|
|
|
|
Q_UNUSED(callData);
|
|
|
|
|
|
|
|
|
|
vtkImplicitPlaneWidget2* widget = vtkImplicitPlaneWidget2::SafeDownCast(caller);
|
|
|
|
|
if (widget == nullptr)return;
|
|
|
|
|
vtkImplicitPlaneRepresentation* representation = widget->GetImplicitPlaneRepresentation();
|
|
|
|
|
if (representation == nullptr)return;
|
|
|
|
|
double origin[3] = { 0,0,0 };
|
|
|
|
|
double normal[3] = { 0,0,0 };
|
|
|
|
|
representation->GetOrigin(origin);
|
|
|
|
|
representation->GetNormal(normal);
|
|
|
|
|
emit sigValueChange(origin, normal);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|