0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[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
19#include <Standard.hxx>
20#include <Standard_Type.hxx>
21
22#include <TopoDS_Shape.hxx>
23#include <gp_Pnt.hxx>
24#include <AIS_Relation.hxx>
25#include <Standard_Boolean.hxx>
26#include <PrsMgr_PresentationManager3d.hxx>
27#include <Standard_Integer.hxx>
28#include <SelectMgr_Selection.hxx>
29class TopoDS_Shape;
30class Geom_Plane;
31class Prs3d_Presentation;
32class Prs3d_Projector;
33class Geom_Transformation;
34class gp_Lin;
35class gp_Pnt;
36class gp_Circ;
37class gp_Elips;
38
39
40class AIS_MidPointRelation;
41DEFINE_STANDARD_HANDLE(AIS_MidPointRelation, AIS_Relation)
42
43//! presentation of equal distance to point myMidPoint
44class AIS_MidPointRelation : public AIS_Relation
45{
46
47public:
48
49
50 Standard_EXPORT AIS_MidPointRelation(const TopoDS_Shape& aSymmTool, const TopoDS_Shape& FirstShape, const TopoDS_Shape& SecondShape, const Handle(Geom_Plane)& aPlane);
51
52 virtual Standard_Boolean IsMovable() const Standard_OVERRIDE;
53
54 void SetTool (const TopoDS_Shape& aMidPointTool);
55
56 const TopoDS_Shape& GetTool() const;
57
58 //! Computes the presentation according to a point of view
59 //! given by <aProjector>.
60 //! To be Used when the associated degenerated Presentations
61 //! have been transformed by <aTrsf> which is not a Pure
62 //! Translation. The HLR Prs can't be deducted automatically
63 //! WARNING :<aTrsf> must be applied
64 //! to the object to display before computation !!!
65 Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
66
67
68
69
92efcf78 70 DEFINE_STANDARD_RTTIEXT(AIS_MidPointRelation,AIS_Relation)
42cf5bc1 71
72protected:
73
74
75
76
77private:
78
79
80 Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
81
82 Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
83
79104795 84 Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
42cf5bc1 85
86 Standard_EXPORT void ComputeFaceFromPnt (const Handle(Prs3d_Presentation)& aprs, const Standard_Boolean first);
87
88 Standard_EXPORT void ComputeEdgeFromPnt (const Handle(Prs3d_Presentation)& aprs, const Standard_Boolean first);
89
90 Standard_EXPORT void ComputeVertexFromPnt (const Handle(Prs3d_Presentation)& aprs, const Standard_Boolean first);
91
92 Standard_EXPORT void ComputePointsOnLine (const gp_Lin& aLin, const Standard_Boolean first);
93
94 Standard_EXPORT void ComputePointsOnLine (const gp_Pnt& pnt1, const gp_Pnt& pnt2, const Standard_Boolean first);
95
96 Standard_EXPORT void ComputePointsOnCirc (const gp_Circ& aCirc, const gp_Pnt& pnt1, const gp_Pnt& pnt2, const Standard_Boolean first);
97
98 //! ComputePointsOn... methods set myFAttach, myFirstPnt and myLastPnt
99 //! from the following initial data: curve, end points, myMidPoint.
100 //! End points (pnt1 & pnt2) and curve define the trimmed curve.
101 //! If end points are equal, curve is not trimmed (line - special case).
102 //!
103 //! .------. pnt2
104 //! /
105 //! . circle . myLastPnt
106 //! | |
107 //! . pnt1 . myFAttach
108 //! \ arc / . myMidPoint
109 //! .______. myFirstPnt
110 Standard_EXPORT void ComputePointsOnElips (const gp_Elips& anEll, const gp_Pnt& pnt1, const gp_Pnt& pnt2, const Standard_Boolean first);
111
112 TopoDS_Shape myTool;
113 gp_Pnt myMidPoint;
114 gp_Pnt myFAttach;
115 gp_Pnt myFirstPnt1;
116 gp_Pnt myFirstPnt2;
117 gp_Pnt mySAttach;
118 gp_Pnt mySecondPnt1;
119 gp_Pnt mySecondPnt2;
120
121
122};
123
124
125#include <AIS_MidPointRelation.lxx>
126
127
128
129
130
131#endif // _AIS_MidPointRelation_HeaderFile