]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
AIS presentation for a curve creator
authornds <nds@opencascade.com>
Mon, 2 Dec 2013 05:57:35 +0000 (05:57 +0000)
committernds <nds@opencascade.com>
Mon, 2 Dec 2013 05:57:35 +0000 (05:57 +0000)
src/HYDROCurveCreator/CMakeLists.txt
src/HYDROCurveCreator/CurveCreator_AISCurve.cxx [new file with mode: 0644]
src/HYDROCurveCreator/CurveCreator_AISCurve.hxx [new file with mode: 0644]

index 679e6ab098c6184b2fcfb4226b40c2a48d2bbe76..1ef4282b430319fd9b060be3898509a9c6f1e83b 100644 (file)
@@ -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 (file)
index 0000000..952364d
--- /dev/null
@@ -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 (file)
index 0000000..3672e57
--- /dev/null
@@ -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 <Standard_DefineHandle.hxx>   
+
+#include <AIS_Shape.hxx>
+
+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