_centerPoint=point;
}
-/*
- SETS AXIS POINT
-*/
-void Transformer::SetAxis(std::vector<double> axis)
-{
- _transformAxis=axis;
-}
-
/*
SETS THE ANGLE
*/
/*
MAKES THE TRANSFORMATIONS
*/
-void Transformer::Run(bool _3D)
+void Transformer::Run()
{
_transform->Identity();
_transform->Translate(_centerPoint[0], _centerPoint[1], _centerPoint[2]);
- std::cout << "Transformer: Center points: X = " << _centerPoint[0] << " Y = " << _centerPoint[1] << " Z = " << _centerPoint[2] << std::endl;
- std::cout << "Transformer Angle: " << _angle << std::endl;
-
_transform->Scale(_scaleX, _scaleY,_scaleZ);
- if(_3D)
- {
- _transform->RotateWXYZ(_angle, _transformAxis[0], _transformAxis[1], _transformAxis[2]);
- std::cout << "Transformer 3D Version" << std::endl;
- }
- else
- {
- _transform->RotateWXYZ(_angle, 0, 0, 1);
- }
+ _transform->RotateWXYZ(_angle, 0, 0, 1);
_transform->Update();
}
~Transformer();
void SetTransform(vtkTransform *transform);
void SetCenterPoint(std::vector<int> point);
- void SetAxis(std::vector<double> axis);
void SetAngle(double angle);
void SetScaleX(double scaleX);
void SetScaleY(double scaleY);
void SetScaleZ(double scaleZ);
- void Run(bool _3D);
+ void Run();
vtkTransform *GetResult();
private:
std::vector<int> _centerPoint;
- std::vector<double> _transformAxis;
+
double _angle;
double _scaleX;
double _scaleY;