18 const Eigen::Vector3d& center,
const Eigen::Matrix3d& axes)
20 vtkNew<vtkSphereSource>
sphere;
22 sphere->SetThetaResolution(32);
23 sphere->SetPhiResolution(33);
24 sphere->SetOutputPointsPrecision(vtkAlgorithm::DOUBLE_PRECISION);
28 vtkNew<vtkMatrix4x4>
matrix;
30 for(
int i=0;
i<3; ++
i)
32 for(
int j=0;
j<3; ++
j)
38 vtkNew<vtkTransform> transform;
39 transform->SetMatrix(
matrix);
40 vtkNew<vtkTransformPolyDataFilter> filter;
41 filter->SetTransform(transform);
42 filter->SetInputConnection(
sphere->GetOutputPort());
43 filter->SetOutputPointsPrecision(vtkAlgorithm::DOUBLE_PRECISION);
45 auto result=vtkSmartPointer<vtkPolyData>::New();
46 result->ShallowCopy(filter->GetOutput());