28 Axes (std::string name,
float size = 1.0) :
31 axes_->SetOrigin (0, 0, 0);
32 axes_->SetScaleFactor (size);
36#if (VTK_MAJOR_VERSION > 9) || (VTK_MAJOR_VERSION == 9 && VTK_MINOR_VERSION >= 7)
37 axes_colors->ReserveValues (6);
39 axes_colors->Allocate (6);
41 axes_colors->InsertNextValue (0.0);
42 axes_colors->InsertNextValue (0.0);
43 axes_colors->InsertNextValue (0.5);
44 axes_colors->InsertNextValue (0.5);
45 axes_colors->InsertNextValue (1.0);
46 axes_colors->InsertNextValue (1.0);
49 axes_data->GetPointData ()->SetScalars (axes_colors);
52 axes_tubes->SetInputData (axes_data);
53 axes_tubes->SetRadius (axes_->GetScaleFactor () / 100.0);
54 axes_tubes->SetNumberOfSides (6);
57 axes_mapper->SetScalarModeToUsePointData ();
58 axes_mapper->SetInputData (axes_tubes->GetOutput ());
61 axes_actor_->GetProperty ()->SetLighting (
false);
62 axes_actor_->SetMapper (axes_mapper);