00001 /****************************************************************************************************** 00002 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released * 00003 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file * 00004 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. * 00005 ******************************************************************************************************/ 00006 00007 #include "CallbackUpdateTransform.h" 00008 #include "Point.h" 00009 00010 CallbackUpdateTransform::CallbackUpdateTransform(const DocumentModelCoords &modelCoords, 00011 DocumentAxesPointsRequired documentAxesPointsRequired) : 00012 CallbackAxisPointsAbstract (modelCoords, 00013 documentAxesPointsRequired) 00014 { 00015 } 00016 00017 bool CallbackUpdateTransform::transformIsDefined () const 00018 { 00019 if (documentAxesPointsRequired () == DOCUMENT_AXES_POINTS_REQUIRED_3) { 00020 return !isError () && (numberAxisPoints () == 3); 00021 } else { 00022 return !isError () && (numberAxisPoints () == 4); 00023 } 00024 }