X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsKernelEditorGraphic%2FGObjectModel.cxx;h=46e77d4888d10e560e581121e139d7f24f11dc25;hb=3babfd57a9b4b3cffba34415e928239592e7d4a1;hp=d871e06c0c2250eed76e9003952a0cc007a9ca9a;hpb=64fc9f949ff91d6e9d448ca0567e6205ee4d5be4;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx index d871e06..46e77d4 100644 --- a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx +++ b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx @@ -68,12 +68,20 @@ namespace bbtk void GObjectModel::getFinalPoint(double& x, double& y, double& z) { - x = _xInic+BOX_SIDE; - y = _yInic+BOX_SIDE; + x = _xFin; + y = _yFin; z = _zFin; } //========================================================================= + void GObjectModel::getCenter(double& x, double& y, double& z) + { + x = (_xInic+_xFin)/2; + y = (_yInic+_yFin)/2; + z = (_zInic+_zFin)/2; + } + //========================================================================= + void GObjectModel::setInicPoint(double& x, double& y, double& z) { _xInic = x; @@ -91,6 +99,82 @@ namespace bbtk } //========================================================================= + void GObjectModel::setGObjectType(int gObjectType) + { + _gObjectType = gObjectType; + } + + //========================================================================= + + int GObjectModel::getGObjectType() + { + return _gObjectType; + } + + //========================================================================= + + bool GObjectModel::isPointInside(double x,double y, double z)//virtual + { + if(x>=_xInic && x<=_xFin && y<=_yInic && y>=_yFin) + { + return true; + } + else + { + return false; + } + } + + //========================================================================= + + void GObjectModel::updateBlackBox(BlackBoxDescriptor::Pointer descriptor)//virtual + { + } + + //========================================================================= + + void GObjectModel::move(double xx,double yy,double zz)//virtual + { + setInicPoint(xx,yy,zz); + } + + //========================================================================= + + std::string GObjectModel::getBBTKType() + { + return _bbtkType; + } + + //========================================================================= + + void GObjectModel::setBBTKType(std::string obtype) + { + _bbtkType = obtype; + } + + //========================================================================= + + std::string GObjectModel::getBBTKName() + { + return _bbtkName; + } + + //========================================================================= + + void GObjectModel::setBBTKName(std::string obname) + { + _bbtkName = obname; + } + + //========================================================================= + + std::string GObjectModel::getStatusText()//virtual + { + std::string virt = ""; + return virt; + } + + //========================================================================= } // EO namespace bbtk