10 #include <vtkDoubleArray.h>
12 #include <vtkPoints.h>
13 #include <vtkRenderWindowInteractor.h>
14 #include <vtkRenderer.h>
15 #include <vtkTransform.h>
20 int X,
int Y,
double *p1,
double *p2,
double *vpn) {
21 double *pts =
static_cast<vtkDoubleArray *
>(this->
Points->GetData())
23 double *center =
static_cast<vtkDoubleArray *
>(this->
Points->GetData())
36 double y[3] = {0, 1, 0};
39 if (vtkMath::Normalize(m) == 0.0 || vtkMath::Normalize(v) == 0.0) {
43 double cos_alpha = vtkMath::Dot(m, v);
44 int *
size = this->CurrentRenderer->GetSize();
45 double l2 = (
X - this->Interactor->GetLastEventPosition()[0]) *
46 (
X - this->Interactor->GetLastEventPosition()[0]) +
47 (Y - this->Interactor->GetLastEventPosition()[1]) *
48 (Y - this->Interactor->GetLastEventPosition()[1]);
49 theta = 360.0 * cos_alpha *
54 this->
Transform->Translate(center[0], center[1], center[2]);
56 this->
Transform->Translate(-center[0], -center[1], -center[2]);
59 vtkPoints *newPts = vtkPoints::New(VTK_DOUBLE);
62 for (i = 0; i < 8; i++, pts += 3) {
63 this->
Points->SetPoint(i, newPts->GetPoint(i));
67 this->PositionHandles();
CLOUDVIEWER_HOST_DEVICE float Cross(const Point &a, const Point &b)
void Transform(benchmark::State &state, const core::Device &device)
std::vector< Eigen::Vector3f > Points