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.
22 lines
758 B
C++
22 lines
758 B
C++
#include "PostGraphWidgetCylinderCallBack.h"
|
|
|
|
#include <vtkImplicitCylinderWidget.h>
|
|
#include <vtkImplicitCylinderRepresentation.h>
|
|
|
|
namespace Interface
|
|
{
|
|
void PostGraphWidgetCylinderCallBack::Execute(vtkObject * caller, unsigned long eventId, void * callData)
|
|
{
|
|
vtkImplicitCylinderWidget* widget = vtkImplicitCylinderWidget::SafeDownCast(caller);
|
|
if (widget == nullptr)return;
|
|
vtkImplicitCylinderRepresentation* rep = widget->GetCylinderRepresentation();
|
|
if (rep == nullptr)return;
|
|
|
|
double center[3] = { 0, 0, 0 }, axis[3] = { 0, 0, 0 }, radius = 0.0;
|
|
|
|
rep->GetCenter(center);
|
|
rep->GetAxis(axis);
|
|
radius = rep->GetRadius();
|
|
emit sigValueChange(center, axis, radius);
|
|
}
|
|
} |