X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsKernelEditorGraphic%2FGObjectModel.cxx;h=41148af3db9acf02bf04752c096cc48da3e8fb31;hb=fb950461b1d139c1ec6ab2ac7a33570c0c63fd61;hp=f6d8c4d174da9f0fedebfdf3c5806166893797f4;hpb=0b3b25440d23eabf549ebdfa0a4a39ea91ea2f23;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx index f6d8c4d..41148af 100644 --- a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx +++ b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx @@ -50,7 +50,6 @@ namespace bbtk _xFin = 0; _yFin = 0; _zFin = 900; - _state = NOTHING_HAPPENS; } //========================================================================= @@ -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,19 +127,70 @@ namespace bbtk //========================================================================= - void GObjectModel::updateBlackBox(BlackBoxDescriptor::Pointer descriptor)//virtual + void GObjectModel::move(double xx,double yy,double zz)//virtual { + setInicPoint(xx,yy,zz); } //========================================================================= - void GObjectModel::move(double xx,double yy,double zz)//virtual + std::string GObjectModel::getBBTKType() { - setInicPoint(xx,yy,zz); + 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; + } + + //========================================================================= + + int GObjectModel::getObjectId() + { + return _objectId; + } + + //========================================================================= + + void GObjectModel::setObjectId(int id) + { + _objectId=id; + } + + //========================================================================= + + void GObjectModel::save(std::string &content) + { + //virtual + } + + //========================================================================= + } // EO namespace bbtk // EOF