0031456: Visualization - move out Dimensions and Relations from package AIS to PrsDims
[occt.git] / src / PrsDim / PrsDim_LengthDimension.hxx
old mode 100755 (executable)
new mode 100644 (file)
similarity index 86%
rename from src/AIS/AIS_LengthDimension.hxx
rename to src/PrsDim/PrsDim_LengthDimension.hxx
index 44eef50..e2d989c
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-#ifndef _AIS_LengthDimension_HeaderFile
-#define _AIS_LengthDimension_HeaderFile
+#ifndef _PrsDim_LengthDimension_HeaderFile
+#define _PrsDim_LengthDimension_HeaderFile
 
-#include <AIS.hxx>
-#include <AIS_Dimension.hxx>
-#include <AIS_KindOfDimension.hxx>
+#include <PrsDim_Dimension.hxx>
+#include <PrsDim_KindOfDimension.hxx>
 #include <Geom_Plane.hxx>
 #include <gp_Pnt.hxx>
 #include <gp_Dir.hxx>
@@ -25,7 +24,7 @@
 #include <TopoDS.hxx>
 #include <TopoDS_Vertex.hxx>
 
-DEFINE_STANDARD_HANDLE (AIS_LengthDimension, AIS_Dimension)
+DEFINE_STANDARD_HANDLE (PrsDim_LengthDimension, PrsDim_Dimension)
 
 //! Length dimension. Can be constructued:
 //! - Between two generic points.
@@ -45,72 +44,61 @@ DEFINE_STANDARD_HANDLE (AIS_LengthDimension, AIS_Dimension)
 //! or the distance between measured points is less than
 //! Precision::Confusion(), the dimension is invalid and its
 //! presentation can not be computed.
-class AIS_LengthDimension : public AIS_Dimension
+class PrsDim_LengthDimension : public PrsDim_Dimension
 {
+  DEFINE_STANDARD_RTTIEXT(PrsDim_LengthDimension, PrsDim_Dimension)
 public:
 
   //! Construct length dimension between face and edge.
   //! Here dimension can be built without user-defined plane.
   //! @param theFace [in] the face (first shape).
   //! @param theEdge [in] the edge (second shape).
-  Standard_EXPORT AIS_LengthDimension (const TopoDS_Face& theFace,
-                                       const TopoDS_Edge& theEdge);
+  Standard_EXPORT PrsDim_LengthDimension (const TopoDS_Face& theFace,
+                                          const TopoDS_Edge& theEdge);
 
   //! Construct length dimension between two faces.
   //! @param theFirstFace [in] the first face (first shape).
   //! @param theSecondFace [in] the second face (second shape).
-  Standard_EXPORT AIS_LengthDimension (const TopoDS_Face& theFirstFace,
-                                       const TopoDS_Face& theSecondFace);
+  Standard_EXPORT PrsDim_LengthDimension (const TopoDS_Face& theFirstFace,
+                                          const TopoDS_Face& theSecondFace);
 
   //! Construct length dimension between two points in
   //! the specified plane.
   //! @param theFirstPoint [in] the first point.
   //! @param theSecondPoint [in] the second point.
   //! @param thePlane [in] the plane to orient dimension.
-  Standard_EXPORT AIS_LengthDimension (const gp_Pnt& theFirstPoint,
-                                       const gp_Pnt& theSecondPoint,
-                                       const gp_Pln& thePlane);
+  Standard_EXPORT PrsDim_LengthDimension (const gp_Pnt& theFirstPoint,
+                                          const gp_Pnt& theSecondPoint,
+                                          const gp_Pln& thePlane);
 
   //! Construct length dimension between two arbitrary shapes in
   //! the specified plane.
   //! @param theFirstShape [in] the first shape.
   //! @param theSecondShape [in] the second shape.
   //! @param thePlane [in] the plane to orient dimension.
-  Standard_EXPORT AIS_LengthDimension (const TopoDS_Shape& theFirstShape,
-                                       const TopoDS_Shape& theSecondShape,
-                                       const gp_Pln& thePlane);
+  Standard_EXPORT PrsDim_LengthDimension (const TopoDS_Shape& theFirstShape,
+                                          const TopoDS_Shape& theSecondShape,
+                                          const gp_Pln& thePlane);
 
   //! Construct length dimension of linear edge.
   //! @param theEdge [in] the edge to measure.
   //! @param thePlane [in] the plane to orient dimension.
-  Standard_EXPORT AIS_LengthDimension (const TopoDS_Edge& theEdge,
-                                       const gp_Pln& thePlane);
+  Standard_EXPORT PrsDim_LengthDimension (const TopoDS_Edge& theEdge,
+                                          const gp_Pln& thePlane);
 
 public:
 
   //! @return first attachement point.
-  const gp_Pnt& FirstPoint() const
-  {
-    return myFirstPoint;
-  }
+  const gp_Pnt& FirstPoint() const { return myFirstPoint; }
 
   //! @return second attachement point.
-  const gp_Pnt& SecondPoint() const
-  {
-    return mySecondPoint;
-  }
+  const gp_Pnt& SecondPoint() const { return mySecondPoint; }
 
   //! @return first attachement shape.
-  const TopoDS_Shape& FirstShape() const
-  {
-    return myFirstShape;
-  }
+  const TopoDS_Shape& FirstShape() const { return myFirstShape; }
 
   //! @return second attachement shape.
-  const TopoDS_Shape& SecondShape() const
-  {
-    return mySecondShape;
-  }
+  const TopoDS_Shape& SecondShape() const { return mySecondShape; }
 
 public:
 
@@ -167,7 +155,7 @@ public:
 
   Standard_EXPORT virtual void SetTextPosition (const gp_Pnt& theTextPos) Standard_OVERRIDE;
 
-  Standard_EXPORT virtual const gp_Pnt GetTextPosition() const Standard_OVERRIDE;
+  Standard_EXPORT virtual gp_Pnt GetTextPosition() const Standard_OVERRIDE;
 
   //! Set custom direction for dimension. If it is not set, the direction is obtained
   //! from the measured geometry (e.g. line between points of dimension)
@@ -176,10 +164,6 @@ public:
   //! @param theUseDirection [in] boolean value if custom direction should be used.
   Standard_EXPORT void SetDirection (const gp_Dir& theDirection, const Standard_Boolean theUseDirection = Standard_True);
 
-public:
-
-  DEFINE_STANDARD_RTTIEXT(AIS_LengthDimension,AIS_Dimension)
-
 protected:
 
   //! Checks if the plane includes first and second points to build dimension.
@@ -262,4 +246,4 @@ private:
   Standard_Boolean myHasCustomDirection;
 };
 
-#endif // _AIS_LengthDimension_HeaderFile
+#endif // _PrsDim_LengthDimension_HeaderFile