X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsKernelEditorGraphic%2FGObjectModel.cxx;h=1ab4ad3a1d70a3f9b3ca84b884e4f772ff2d3576;hb=108bfeda96a8850e469fa80add666a5c1dbf1c1f;hp=4752ec9595d6414bc1adc71812582e7d6e081e45;hpb=311af31f393ba7d5788a0a843ee412eebdf43a82;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx index 4752ec9..1ab4ad3 100644 --- a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx +++ b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx @@ -46,11 +46,10 @@ namespace bbtk _xInic = 0; _yInic = 0; - _zInic = 900; + _zInic = GPOSITION_Z; _xFin = 0; _yFin = 0; - _zFin = 900; - _state = NOTHING_HAPPENS; + _zFin = GPOSITION_Z; } //========================================================================= @@ -75,6 +74,14 @@ namespace bbtk } //========================================================================= + 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; @@ -92,20 +99,6 @@ namespace bbtk } //========================================================================= - void GObjectModel::setState(int state) - { - _state = state; - } - - //========================================================================= - - int GObjectModel::getState() - { - return _state; - } - - //========================================================================= - void GObjectModel::setGObjectType(int gObjectType) { _gObjectType = gObjectType; @@ -134,13 +127,82 @@ namespace bbtk //========================================================================= - 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::getBBTKDescription() + { + return _bbtkDescription; + } + + //========================================================================= + + void GObjectModel::setBBTKDescription(std::string obdescription) + { + _bbtkDescription = obdescription; + } + + //========================================================================= + + std::string GObjectModel::getStatusText()//virtual + { + std::string virt = ""; + return virt; + } + + //========================================================================= + + int GObjectModel::getObjectId() + { + return _objectId; + } + + //========================================================================= + + void GObjectModel::setObjectId(int id) + { + _objectId=id; + } + + //========================================================================= + + void GObjectModel::save(std::string &content) + { + //virtual + } + //========================================================================= } // EO namespace bbtk