From: nds Date: Mon, 2 Dec 2013 05:57:35 +0000 (+0000) Subject: AIS presentation for a curve creator X-Git-Tag: BR_hydro_v_0_4~117 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=34204a67c211e57ea4b2b762eb35495f53031161;p=modules%2Fhydro.git AIS presentation for a curve creator --- diff --git a/src/HYDROCurveCreator/CMakeLists.txt b/src/HYDROCurveCreator/CMakeLists.txt index 679e6ab0..1ef4282b 100644 --- a/src/HYDROCurveCreator/CMakeLists.txt +++ b/src/HYDROCurveCreator/CMakeLists.txt @@ -71,6 +71,7 @@ ENDIF(SALOME_BUILD_GUI) SET(_other_HEADERS CurveCreator.hxx CurveCreator_Displayer.h + CurveCreator_AISCurve.hxx CurveCreator_Curve.hxx CurveCreator_Diff.hxx CurveCreator_ICurve.hxx @@ -95,6 +96,7 @@ ENDIF(SALOME_BUILD_GUI) # sources / static SET(_other_SOURCES CurveCreator_Displayer.cxx + CurveCreator_AISCurve.cxx CurveCreator_Curve.cxx CurveCreator_Diff.cxx CurveCreator_Operation.cxx diff --git a/src/HYDROCurveCreator/CurveCreator_AISCurve.cxx b/src/HYDROCurveCreator/CurveCreator_AISCurve.cxx new file mode 100644 index 00000000..952364d0 --- /dev/null +++ b/src/HYDROCurveCreator/CurveCreator_AISCurve.cxx @@ -0,0 +1,41 @@ +// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "CurveCreator_AISCurve.hxx" + +IMPLEMENT_STANDARD_HANDLE(CurveCreator_AISCurve, AIS_Shape) +IMPLEMENT_STANDARD_RTTIEXT(CurveCreator_AISCurve, AIS_Shape) + +CurveCreator_AISCurve::CurveCreator_AISCurve() +: AIS_Shape( TopoDS_Shape() ) +{ +} + +void CurveCreator_AISCurve::Compute( const Handle(PrsMgr_PresentationManager3d)& thePM, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode ) +{ + AIS_Shape::Compute( thePM, thePrs, theMode ); +} + +void CurveCreator_AISCurve::ComputeSelection( const Handle(SelectMgr_Selection)& theSelection, + const Standard_Integer theMode ) +{ + AIS_Shape::ComputeSelection( theSelection, theMode ); +} diff --git a/src/HYDROCurveCreator/CurveCreator_AISCurve.hxx b/src/HYDROCurveCreator/CurveCreator_AISCurve.hxx new file mode 100644 index 00000000..3672e57b --- /dev/null +++ b/src/HYDROCurveCreator/CurveCreator_AISCurve.hxx @@ -0,0 +1,64 @@ +// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef CURVECREATOR_AIS_CURVE_H +#define CURVECREATOR_AIS_CURVE_H + +#include "CurveCreator.hxx" +#include "CurveCreator_Macro.hxx" + +#include + +#include + +DEFINE_STANDARD_HANDLE(CurveCreator_AISCurve, AIS_Shape) + +/** + * \class CurveCreator_AISCurve + * \brief This class builds an AIS presentation for a curve creator interface + */ +class CurveCreator_AISCurve : public AIS_Shape +{ +public: + Standard_EXPORT CurveCreator_AISCurve(); + +protected: + /** + * Computes the 3D presentation + * \param thePM a presentation Manager + * \param thePrs a presentation + * \theMode a compute mode + */ + Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePM, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode); + + /** + * Computes the 3D selection + * \param theSelection a selection manager + * \theMode a selection mode + */ + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& theSelection, + const Standard_Integer theMode); + +public: + DEFINE_STANDARD_RTTI(CurveCreator_AISCurve) +}; + +#endif // CURVECREATOR_AIS_CURVE_H