0031456: Visualization - move out Dimensions and Relations from package AIS to PrsDims
[occt.git] / src / PrsDim / PrsDim_SymmetricRelation.hxx
similarity index 66%
rename from src/AIS/AIS_SymmetricRelation.hxx
rename to src/PrsDim/PrsDim_SymmetricRelation.hxx
index 1f3ce3c..639d7ad 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-#ifndef _AIS_SymmetricRelation_HeaderFile
-#define _AIS_SymmetricRelation_HeaderFile
+#ifndef _PrsDim_SymmetricRelation_HeaderFile
+#define _PrsDim_SymmetricRelation_HeaderFile
 
 #include <TopoDS_Shape.hxx>
 #include <gp_Pnt.hxx>
 #include <gp_Dir.hxx>
-#include <AIS_Relation.hxx>
+#include <PrsDim_Relation.hxx>
 
-DEFINE_STANDARD_HANDLE(AIS_SymmetricRelation, AIS_Relation)
+DEFINE_STANDARD_HANDLE(PrsDim_SymmetricRelation, PrsDim_Relation)
 
 //! A framework to display constraints of symmetricity
 //! between two or more datum Interactive Objects.
 //! A plane serves as the axis of symmetry between the
 //! shapes of which the datums are parts.
-class AIS_SymmetricRelation : public AIS_Relation
+class PrsDim_SymmetricRelation : public PrsDim_Relation
 {
-  DEFINE_STANDARD_RTTIEXT(AIS_SymmetricRelation, AIS_Relation)
+  DEFINE_STANDARD_RTTIEXT(PrsDim_SymmetricRelation, PrsDim_Relation)
 public:
 
   //! Constructs an object to display constraints of symmetricity.
@@ -41,25 +41,25 @@ public:
   //! SecondShape and aPlane. It may be queried and
   //! edited using the functions GetTool and SetTool.
   //! The two shapes are typically two edges, two vertices or two points.
-  Standard_EXPORT AIS_SymmetricRelation(const TopoDS_Shape& aSymmTool, const TopoDS_Shape& FirstShape, const TopoDS_Shape& SecondShape, const Handle(Geom_Plane)& aPlane);
+  Standard_EXPORT PrsDim_SymmetricRelation(const TopoDS_Shape& aSymmTool, const TopoDS_Shape& FirstShape, const TopoDS_Shape& SecondShape, const Handle(Geom_Plane)& aPlane);
   
   //! Returns true if the symmetric constraint display is movable.
-    virtual Standard_Boolean IsMovable() const Standard_OVERRIDE;
-  
+  virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; }
+
   //! Sets the tool aSymmetricTool composed of a first
   //! shape, a second shape, and a plane.
   //! This tool is initially created at construction time.
-    void SetTool (const TopoDS_Shape& aSymmetricTool);
-  
+  void SetTool (const TopoDS_Shape& aSymmetricTool) { myTool = aSymmetricTool; }
+
   //! Returns the tool composed of a first shape, a second
   //! shape, and a plane. This tool is created at construction time.
-    const TopoDS_Shape& GetTool() const;
+  const TopoDS_Shape& GetTool() const { return myTool; }
 
 private:
 
-  Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
+  Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
   
-  Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
+  Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
   
   Standard_EXPORT void ComputeTwoFacesSymmetric (const Handle(Prs3d_Presentation)& aprs);
   
@@ -67,6 +67,8 @@ private:
   
   Standard_EXPORT void ComputeTwoVerticesSymmetric (const Handle(Prs3d_Presentation)& aprs);
 
+private:
+
   TopoDS_Shape myTool;
   gp_Pnt myFAttach;
   gp_Pnt mySAttach;
@@ -75,6 +77,4 @@ private:
 
 };
 
-#include <AIS_SymmetricRelation.lxx>
-
-#endif // _AIS_SymmetricRelation_HeaderFile
+#endif // _PrsDim_SymmetricRelation_HeaderFile