0031459: Visualization, AIS_TextLabel - add missing getters
[occt.git] / src / AIS / AIS_MidPointRelation.hxx
CommitLineData
42cf5bc1 1// Created on: 2000-10-20
2// Created by: Julia DOROVSKIKH
3// Copyright (c) 2000-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _AIS_MidPointRelation_HeaderFile
17#define _AIS_MidPointRelation_HeaderFile
18
42cf5bc1 19#include <AIS_Relation.hxx>
7dd7c146 20
42cf5bc1 21class Geom_Plane;
42cf5bc1 22class gp_Lin;
23class gp_Pnt;
24class gp_Circ;
25class gp_Elips;
26
42cf5bc1 27DEFINE_STANDARD_HANDLE(AIS_MidPointRelation, AIS_Relation)
28
29//! presentation of equal distance to point myMidPoint
30class AIS_MidPointRelation : public AIS_Relation
31{
7dd7c146 32 DEFINE_STANDARD_RTTIEXT(AIS_MidPointRelation, AIS_Relation)
42cf5bc1 33public:
34
42cf5bc1 35 Standard_EXPORT AIS_MidPointRelation(const TopoDS_Shape& aSymmTool, const TopoDS_Shape& FirstShape, const TopoDS_Shape& SecondShape, const Handle(Geom_Plane)& aPlane);
36
37 virtual Standard_Boolean IsMovable() const Standard_OVERRIDE;
38
39 void SetTool (const TopoDS_Shape& aMidPointTool);
40
41 const TopoDS_Shape& GetTool() const;
42cf5bc1 42
42cf5bc1 43private:
44
42cf5bc1 45 Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
46
79104795 47 Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
42cf5bc1 48
49 Standard_EXPORT void ComputeFaceFromPnt (const Handle(Prs3d_Presentation)& aprs, const Standard_Boolean first);
50
51 Standard_EXPORT void ComputeEdgeFromPnt (const Handle(Prs3d_Presentation)& aprs, const Standard_Boolean first);
52
53 Standard_EXPORT void ComputeVertexFromPnt (const Handle(Prs3d_Presentation)& aprs, const Standard_Boolean first);
54
55 Standard_EXPORT void ComputePointsOnLine (const gp_Lin& aLin, const Standard_Boolean first);
56
57 Standard_EXPORT void ComputePointsOnLine (const gp_Pnt& pnt1, const gp_Pnt& pnt2, const Standard_Boolean first);
58
59 Standard_EXPORT void ComputePointsOnCirc (const gp_Circ& aCirc, const gp_Pnt& pnt1, const gp_Pnt& pnt2, const Standard_Boolean first);
60
61 //! ComputePointsOn... methods set myFAttach, myFirstPnt and myLastPnt
62 //! from the following initial data: curve, end points, myMidPoint.
63 //! End points (pnt1 & pnt2) and curve define the trimmed curve.
64 //! If end points are equal, curve is not trimmed (line - special case).
65 //!
66 //! .------. pnt2
67 //! /
68 //! . circle . myLastPnt
69 //! | |
70 //! . pnt1 . myFAttach
71 //! \ arc / . myMidPoint
72 //! .______. myFirstPnt
73 Standard_EXPORT void ComputePointsOnElips (const gp_Elips& anEll, const gp_Pnt& pnt1, const gp_Pnt& pnt2, const Standard_Boolean first);
74
75 TopoDS_Shape myTool;
76 gp_Pnt myMidPoint;
77 gp_Pnt myFAttach;
78 gp_Pnt myFirstPnt1;
79 gp_Pnt myFirstPnt2;
80 gp_Pnt mySAttach;
81 gp_Pnt mySecondPnt1;
82 gp_Pnt mySecondPnt2;
83
42cf5bc1 84};
85
42cf5bc1 86#include <AIS_MidPointRelation.lxx>
87
42cf5bc1 88#endif // _AIS_MidPointRelation_HeaderFile