#include <CutModelFigureCube.h>
Public Member Functions | |
CutModelFigureCube () | |
virtual | ~CutModelFigureCube () |
virtual bool | IfPointInside (double x, double y, double z) |
virtual double | GetTheoricVolume () |
virtual vtkPolyData * | getPolyData () |
virtual char * | GetName () |
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 | |
vtkCubeSource * | _vtkcube |
Definition at line 7 of file CutModelFigureCube.h.
CutModelFigureCube::CutModelFigureCube | ( | ) |
Definition at line 7 of file CutModelFigureCube.cxx.
References _vtkcube.
00008 : CutModelFigure() 00009 { 00010 _vtkcube = vtkCubeSource::New(); 00011 _vtkcube->SetXLength (1); 00012 _vtkcube->SetYLength (1); 00013 _vtkcube->SetZLength (1); 00014 }
CutModelFigureCube::~CutModelFigureCube | ( | ) | [virtual] |
Definition at line 16 of file CutModelFigureCube.cxx.
References _vtkcube.
00017 { 00018 _vtkcube->Delete(); 00019 }
char * CutModelFigureCube::GetName | ( | ) | [virtual] |
Definition at line 44 of file CutModelFigureCube.cxx.
vtkPolyData * CutModelFigureCube::getPolyData | ( | ) | [virtual] |
Implements CutModelFigure.
Definition at line 49 of file CutModelFigureCube.cxx.
References _vtkcube.
00049 { 00050 return _vtkcube->GetOutput(); 00051 }
double CutModelFigureCube::GetTheoricVolume | ( | ) | [virtual] |
Implements CutModelFigure.
Definition at line 38 of file CutModelFigureCube.cxx.
References CutModelFigure::_sx, CutModelFigure::_sy, and CutModelFigure::_sz.
bool CutModelFigureCube::IfPointInside | ( | double | x, | |
double | y, | |||
double | z | |||
) | [virtual] |
Implements CutModelFigure.
Definition at line 21 of file CutModelFigureCube.cxx.
References CutModelFigure::_inversModel.
00022 { 00023 double in[4],out[4]; 00024 in[0]=x; 00025 in[1]=y; 00026 in[2]=z; 00027 in[3]=1; 00028 _inversModel->MultiplyPoint (in, out); 00029 00030 bool result=false; 00031 if ((out[0]>-0.5) && (out[0]<0.5) && (out[1]>-0.5) && (out[1]<0.5) && (out[2]>-0.5) && (out[2]<0.5) ) 00032 { 00033 result=true; 00034 } 00035 return result; 00036 }
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 CutModelFigureSphere::IfPointInside(), CutModelFigureCylinder::IfPointInside(), 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 CutModelFigureSphere::GetTheoricVolume(), CutModelFigureCylinder::GetTheoricVolume(), GetTheoricVolume(), CutModelFigure::SetScale(), and CutModelFigure::SetVtkTransform().
double CutModelFigure::_sy [protected, inherited] |
Definition at line 77 of file CutModelFigure.h.
Referenced by CutModelFigureSphere::GetTheoricVolume(), CutModelFigureCylinder::GetTheoricVolume(), GetTheoricVolume(), CutModelFigure::SetScale(), and CutModelFigure::SetVtkTransform().
double CutModelFigure::_sz [protected, inherited] |
Definition at line 78 of file CutModelFigure.h.
Referenced by CutModelFigureSphere::GetTheoricVolume(), CutModelFigureCylinder::GetTheoricVolume(), GetTheoricVolume(), CutModelFigure::SetScale(), and CutModelFigure::SetVtkTransform().
vtkCubeSource* CutModelFigureCube::_vtkcube [private] |
Definition at line 17 of file CutModelFigureCube.h.
Referenced by CutModelFigureCube(), getPolyData(), and ~CutModelFigureCube().