0032969: Coding - get rid of unused headers [IMeshData to PLib]
[occt.git] / src / Intf / Intf_SectionPoint.hxx
1 // Created on: 1991-06-18
2 // Created by: Didier PIFFAULT
3 // Copyright (c) 1991-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _Intf_SectionPoint_HeaderFile
18 #define _Intf_SectionPoint_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22
23 #include <gp_Pnt.hxx>
24 #include <Intf_PIType.hxx>
25 #include <Standard_Integer.hxx>
26 class gp_Pnt2d;
27
28
29 //! Describes an intersection  point between  polygons  and
30 //! polyedra.
31 class Intf_SectionPoint 
32 {
33 public:
34
35   DEFINE_STANDARD_ALLOC
36
37   //! Returns the location of the SectionPoint.
38   Standard_EXPORT const gp_Pnt& Pnt() const;
39   
40   //! Returns the cumulated  Parameter of the SectionPoint on the
41   //! first element.
42     Standard_Real ParamOnFirst() const;
43   
44   //! Returns the cumulated Parameter of the section point on the
45   //! second element.
46     Standard_Real ParamOnSecond() const;
47   
48   //! Returns the type of the section point on the first element.
49     Intf_PIType TypeOnFirst() const;
50   
51   //! Returns  the  type  of the  section  point  on  the  second
52   //! element.
53     Intf_PIType TypeOnSecond() const;
54   
55   Standard_EXPORT void InfoFirst (Intf_PIType& Dim, Standard_Integer& Add1, Standard_Integer& Add2, Standard_Real& Param) const;
56
57   //! Gives the data about the first argument of the Interference.
58   Standard_EXPORT void InfoFirst (Intf_PIType& Dim, Standard_Integer& Addr, Standard_Real& Param) const;
59
60   Standard_EXPORT void InfoSecond (Intf_PIType& Dim, Standard_Integer& Add1, Standard_Integer& Add2, Standard_Real& Param) const;
61
62   //! Gives the data about the second argument of the Interference.
63   Standard_EXPORT void InfoSecond (Intf_PIType& Dim, Standard_Integer& Addr, Standard_Real& Param) const;
64
65   //! Gives the incidence at  this  section point. The  incidence
66   //! between the two triangles is given by the cosine.  The best
67   //! incidence is 0. (PI/2).  The worst is 1. (null angle).
68   Standard_EXPORT Standard_Real Incidence() const;
69   
70   //! Returns True if the two SectionPoint have the  same logical
71   //! information.
72     Standard_Boolean IsEqual (const Intf_SectionPoint& Other) const;
73   Standard_Boolean operator== (const Intf_SectionPoint& Other) const
74 {
75   return IsEqual(Other);
76 }
77   
78   //! Returns True if the two SectionPoints are  on the  same edge
79   //! of the first or the second element.
80   Standard_EXPORT Standard_Boolean IsOnSameEdge (const Intf_SectionPoint& Other) const;
81   
82   Standard_EXPORT Intf_SectionPoint();
83   
84   //! Builds  a  SectionPoint    with the  respective  dimensions
85   //! (vertex edge or face)  of the concerned arguments and their
86   //! addresses in the Topological structure.
87   Standard_EXPORT Intf_SectionPoint(const gp_Pnt& Where, const Intf_PIType DimeO, const Standard_Integer AddrO1, const Standard_Integer AddrO2, const Standard_Real ParamO, const Intf_PIType DimeT, const Standard_Integer AddrT1, const Standard_Integer AddrT2, const Standard_Real ParamT, const Standard_Real Incid);
88   
89   //! Builds  a  SectionPoint 2d   with the respective dimensions
90   //! (vertex or  edge)  of  the concerned arguments   and  their
91   //! addresses in the Topological structure.
92   Standard_EXPORT Intf_SectionPoint(const gp_Pnt2d& Where, const Intf_PIType DimeO, const Standard_Integer AddrO1, const Standard_Real ParamO, const Intf_PIType DimeT, const Standard_Integer AddrT1, const Standard_Real ParamT, const Standard_Real Incid);
93   
94   //! Merges two SectionPoints.
95   Standard_EXPORT void Merge (Intf_SectionPoint& Other);
96   
97   Standard_EXPORT void Dump (const Standard_Integer Indent) const;
98
99 private:
100
101   gp_Pnt myPnt;
102   Intf_PIType DimenObje;
103   Standard_Integer IndexO1;
104   Standard_Integer IndexO2;
105   Standard_Real ParamObje;
106   Intf_PIType DimenTool;
107   Standard_Integer IndexT1;
108   Standard_Integer IndexT2;
109   Standard_Real ParamTool;
110   Standard_Real Incide;
111
112 };
113
114 #include <Intf_SectionPoint.lxx>
115
116 #endif // _Intf_SectionPoint_HeaderFile