9 #include "fwRenderVTK/vtk/fwVtkAxesActor.hpp" 11 #include <vtkObjectFactory.h> 13 #include <vtkPolyData.h> 14 #include <vtkPolyDataMapper.h> 21 fwVtkAxesActor::fwVtkAxesActor() : vtkAxesActor()
28 fwVtkAxesActor::~fwVtkAxesActor()
40 this->XAxisShaft->GetBounds(this->Bounds);
42 this->YAxisShaft->GetBounds(bounds);
44 for ( i = 0; i < 3; ++i )
47 (bounds[2*i] < this->Bounds[2*i]) ? (bounds[2*i]) : (this->Bounds[2*i]);
50 (bounds[2*i+1] > this->Bounds[2*i+1]) ? (bounds[2*i+1]) : (this->Bounds[2*i+1]);
53 this->ZAxisShaft->GetBounds(bounds);
54 for ( i = 0; i < 3; ++i )
57 (bounds[2*i] < this->Bounds[2*i]) ? (bounds[2*i]) : (this->Bounds[2*i]);
60 (bounds[2*i+1] > this->Bounds[2*i+1]) ? (bounds[2*i+1]) : (this->Bounds[2*i+1]);
63 this->XAxisTip->GetBounds(bounds);
64 for ( i = 0; i < 3; ++i )
67 (bounds[2*i] < this->Bounds[2*i]) ? (bounds[2*i]) : (this->Bounds[2*i]);
70 (bounds[2*i+1]>this->Bounds[2*i+1]) ? (bounds[2*i+1]) : (this->Bounds[2*i+1]);
73 this->YAxisTip->GetBounds(bounds);
74 for ( i = 0; i < 3; ++i )
77 (bounds[2*i] < this->Bounds[2*i]) ? (bounds[2*i]) : (this->Bounds[2*i]);
80 (bounds[2*i+1]>this->Bounds[2*i+1]) ? (bounds[2*i+1]) : (this->Bounds[2*i+1]);
83 this->ZAxisTip->GetBounds(bounds);
84 for ( i = 0; i < 3; ++i )
87 (bounds[2*i] < this->Bounds[2*i]) ? (bounds[2*i]) : (this->Bounds[2*i]);
90 (bounds[2*i+1]>this->Bounds[2*i+1]) ? (bounds[2*i+1]) : (this->Bounds[2*i+1]);
94 (vtkPolyDataMapper::SafeDownCast(this->YAxisShaft->GetMapper()))->
95 GetInput()->GetBounds( dbounds );
97 for ( i = 0; i < 3; ++i )
100 (dbounds[2*i] < this->Bounds[2*i]) ? (dbounds[2*i]) : (this->Bounds[2*i]);
102 this->Bounds[2*i+1] =
103 (dbounds[2*i+1]>this->Bounds[2*i+1]) ? (dbounds[2*i+1]) : (this->Bounds[2*i+1]);
112 void fwVtkAxesActor::PrintSelf(std::ostream &os, vtkIndent indent)
114 os << indent <<
"fwVtkPicker: \n";
115 this->Superclass::PrintSelf(os,indent);
The fwVtkAxesActor class is a specific and movable vtkAxesActor.
FWRENDERVTK_API double * GetBounds() override
Overload of GetBounds method : In vtkAxesActor Bounds are computed as 'Max' of each actors...