]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp
#include "widget/ ..."
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualContour / manualContourModel.cpp
index 0e4becc52e749e048b89ce62bdf4ed104c9a6f99..3a4353a63c671e4cd88d6f4f376a557d4cbed75c 100644 (file)
@@ -45,7 +45,7 @@ manualContourModel::~manualContourModel()
        _cntSplineX->RemoveAllPoints();
        _cntSplineY->RemoveAllPoints();
        _cntSplineZ->RemoveAllPoints();
-       
+
        _cntSplineX->Delete();
        _cntSplineY->Delete();
        _cntSplineZ->Delete();
@@ -620,7 +620,6 @@ void manualContourModel::Open(FILE *ff) // virtual
        }
 }
 
-
 // ----------------------------------------------------------------------------
 int manualContourModel::GetTypeModel() //virtual
 {
@@ -679,3 +678,20 @@ std::vector<manualContourModel*> manualContourModel::ExploseModel(  )
        lstTmp.push_back(this);
        return lstTmp;
 }
+
+
+// ----------------------------------------------------------------------------
+void manualContourModel::Transform_Ax_Plus_B (double Ax, double Bx, double Ay, double By)
+{
+       manualPoint * mp;
+
+       int i, size = GetSizeLstPoints();
+
+       for( i=0; i<size; i++ )
+       {
+               mp = GetManualPoint( i );
+
+               mp->SetPointX( mp->GetX()*Ax + Bx );
+               mp->SetPointY( mp->GetY()*Ay + By );
+       }
+}