1 #ifndef PCL_OUTOFCORE_AXES_H_
2 #define PCL_OUTOFCORE_AXES_H_
12 #include <vtkVersion.h>
14 #include <vtkTubeFilter.h>
17 #include <vtkFloatArray.h>
18 #include <vtkProperty.h>
19 #include <vtkPolyData.h>
20 #include <vtkPolyDataMapper.h>
21 #include <vtkSmartPointer.h>
29 Axes (std::string name,
float size = 1.0) :
33 axes_->SetOrigin (0, 0, 0);
34 axes_->SetScaleFactor (size);
38 axes_colors->Allocate (6);
39 axes_colors->InsertNextValue (0.0);
40 axes_colors->InsertNextValue (0.0);
41 axes_colors->InsertNextValue (0.5);
42 axes_colors->InsertNextValue (0.5);
43 axes_colors->InsertNextValue (1.0);
44 axes_colors->InsertNextValue (1.0);
47 axes_data->GetPointData ()->SetScalars (axes_colors);
50 #if VTK_MAJOR_VERSION < 6
51 axes_tubes->SetInput (axes_data);
53 axes_tubes->SetInputData (axes_data);
55 axes_tubes->SetRadius (axes_->GetScaleFactor () / 100.0);
56 axes_tubes->SetNumberOfSides (6);
59 axes_mapper->SetScalarModeToUsePointData ();
60 #if VTK_MAJOR_VERSION < 6
61 axes_mapper->SetInput (axes_tubes->GetOutput ());
63 axes_mapper->SetInputData (axes_tubes->GetOutput ());
67 axes_actor_->GetProperty ()->SetLighting (
false);
68 axes_actor_->SetMapper (axes_mapper);
vtkSmartPointer< vtkAxes > getAxes() const
vtkSmartPointer< vtkActor > getAxesActor() const
Axes(std::string name, float size=1.0)
void addActor(vtkActor *actor)