#include <CutModelFigureSphere.h>
Public Member Functions | |
CutModelFigureSphere () | |
virtual | ~CutModelFigureSphere () |
virtual bool | IfPointInside (double x, double y, double z) |
virtual double | GetTheoricVolume () |
virtual char * | GetName () |
virtual vtkPolyData * | getPolyData () |
virtual void | SetPosition (double x, double y, double z) |
virtual void | SetScale (double sx, double sy, double sz) |
virtual void | SetRotation (double alfa, double beta, double teta) |
virtual void | SetSpacing (double spcX, double spcY, double spcZ) |
virtual void | SetVtkTransform (vtkTransform *transform) |
virtual void | SetInversVtkTransform (vtkTransform *inverstransform) |
Protected Attributes | |
double | _sx |
double | _sy |
double | _sz |
vtkTransform * | _inversModel |
vtkTransform * | _matrixModel |
Private Attributes | |
vtkSphereSource * | _vtksphere |
Definition at line 7 of file CutModelFigureSphere.h.
CutModelFigureSphere::CutModelFigureSphere | ( | ) |
Definition at line 6 of file CutModelFigureSphere.cxx.
References _vtksphere.
00007 { 00008 _vtksphere = vtkSphereSource::New(); 00009 _vtksphere->SetThetaResolution (20); 00010 _vtksphere->SetPhiResolution (20); 00011 }
CutModelFigureSphere::~CutModelFigureSphere | ( | ) | [virtual] |
Definition at line 13 of file CutModelFigureSphere.cxx.
References _vtksphere.
00014 { 00015 _vtksphere->Delete(); 00016 }
char * CutModelFigureSphere::GetName | ( | ) | [virtual] |
Definition at line 41 of file CutModelFigureSphere.cxx.
vtkPolyData * CutModelFigureSphere::getPolyData | ( | ) | [virtual] |
Implements CutModelFigure.
Definition at line 46 of file CutModelFigureSphere.cxx.
References _vtksphere.
00046 { 00047 return _vtksphere->GetOutput(); 00048 }
double CutModelFigureSphere::GetTheoricVolume | ( | ) | [virtual] |
Implements CutModelFigure.
Definition at line 35 of file CutModelFigureSphere.cxx.
References CutModelFigure::_sx, CutModelFigure::_sy, and CutModelFigure::_sz.
bool CutModelFigureSphere::IfPointInside | ( | double | x, | |
double | y, | |||
double | z | |||
) | [virtual] |
Implements CutModelFigure.
Definition at line 18 of file CutModelFigureSphere.cxx.
References CutModelFigure::_inversModel.
00019 { 00020 double in[4],out[4]; 00021 in[0]=x; 00022 in[1]=y; 00023 in[2]=z; 00024 in[3]=1; 00025 _inversModel->MultiplyPoint (in, out); 00026 00027 bool result=false; 00028 if (sqrt( out[0]*out[0] + out[1]*out[1] + out[2]*out[2] )<0.5 ) 00029 { 00030 result=true; 00031 } 00032 return result; 00033 }
virtual void CutModelFigure::SetInversVtkTransform | ( | vtkTransform * | inverstransform | ) | [inline, virtual, inherited] |
Definition at line 56 of file CutModelFigure.h.
References CutModelFigure::_inversModel.
Referenced by CutModelData::ExecuteCut(), and CutModelData::ExecuteUnCut().
00056 { 00057 _inversModel = inverstransform; 00058 }
virtual void CutModelFigure::SetPosition | ( | double | x, | |
double | y, | |||
double | z | |||
) | [inline, virtual, inherited] |
Definition at line 14 of file CutModelFigure.h.
References CutModelFigure::_px, CutModelFigure::_py, and CutModelFigure::_pz.
virtual void CutModelFigure::SetRotation | ( | double | alfa, | |
double | beta, | |||
double | teta | |||
) | [inline, virtual, inherited] |
Definition at line 26 of file CutModelFigure.h.
References CutModelFigure::_alfa, CutModelFigure::_beta, and CutModelFigure::_teta.
virtual void CutModelFigure::SetScale | ( | double | sx, | |
double | sy, | |||
double | sz | |||
) | [inline, virtual, inherited] |
Definition at line 20 of file CutModelFigure.h.
References CutModelFigure::_sx, CutModelFigure::_sy, and CutModelFigure::_sz.
virtual void CutModelFigure::SetSpacing | ( | double | spcX, | |
double | spcY, | |||
double | spcZ | |||
) | [inline, virtual, inherited] |
Definition at line 32 of file CutModelFigure.h.
References CutModelFigure::_spcX, CutModelFigure::_spcY, and CutModelFigure::_spcZ.
virtual void CutModelFigure::SetVtkTransform | ( | vtkTransform * | transform | ) | [inline, virtual, inherited] |
Definition at line 38 of file CutModelFigure.h.
References CutModelFigure::_alfa, CutModelFigure::_beta, CutModelFigure::_px, CutModelFigure::_py, CutModelFigure::_pz, CutModelFigure::_sx, CutModelFigure::_sy, CutModelFigure::_sz, and CutModelFigure::_teta.
Referenced by CutModelData::ExecuteCut(), and CutModelData::ExecuteUnCut().
00038 { 00039 double *orient = transform->GetOrientation(); 00040 _alfa = orient[0]; 00041 _beta = orient[1]; 00042 _teta = orient[2]; 00043 00044 double *scale = transform->GetScale(); 00045 _sx = scale[0]; 00046 _sy = scale[1]; 00047 _sz = scale[2]; 00048 00049 double *position = transform->GetPosition(); 00050 _px = position[0]; 00051 _py = position[1]; 00052 _pz = position[2]; 00053 00054 00055 }
vtkTransform* CutModelFigure::_inversModel [protected, inherited] |
Definition at line 79 of file CutModelFigure.h.
Referenced by IfPointInside(), CutModelFigureCylinder::IfPointInside(), CutModelFigureCube::IfPointInside(), and CutModelFigure::SetInversVtkTransform().
vtkTransform* CutModelFigure::_matrixModel [protected, inherited] |
Definition at line 80 of file CutModelFigure.h.
double CutModelFigure::_sx [protected, inherited] |
Definition at line 76 of file CutModelFigure.h.
Referenced by GetTheoricVolume(), CutModelFigureCylinder::GetTheoricVolume(), CutModelFigureCube::GetTheoricVolume(), CutModelFigure::SetScale(), and CutModelFigure::SetVtkTransform().
double CutModelFigure::_sy [protected, inherited] |
Definition at line 77 of file CutModelFigure.h.
Referenced by GetTheoricVolume(), CutModelFigureCylinder::GetTheoricVolume(), CutModelFigureCube::GetTheoricVolume(), CutModelFigure::SetScale(), and CutModelFigure::SetVtkTransform().
double CutModelFigure::_sz [protected, inherited] |
Definition at line 78 of file CutModelFigure.h.
Referenced by GetTheoricVolume(), CutModelFigureCylinder::GetTheoricVolume(), CutModelFigureCube::GetTheoricVolume(), CutModelFigure::SetScale(), and CutModelFigure::SetVtkTransform().
vtkSphereSource* CutModelFigureSphere::_vtksphere [private] |
Definition at line 17 of file CutModelFigureSphere.h.
Referenced by CutModelFigureSphere(), getPolyData(), and ~CutModelFigureSphere().