0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / MAT2d / MAT2d_Connexion.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-10-07
2// Created by: Yves FRICAUD
3// Copyright (c) 1993-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 _MAT2d_Connexion_HeaderFile
18#define _MAT2d_Connexion_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Integer.hxx>
24#include <Standard_Real.hxx>
25#include <gp_Pnt2d.hxx>
25e59720 26#include <Standard_Transient.hxx>
42cf5bc1 27#include <Standard_Boolean.hxx>
28class gp_Pnt2d;
29
30
31class MAT2d_Connexion;
25e59720 32DEFINE_STANDARD_HANDLE(MAT2d_Connexion, Standard_Transient)
42cf5bc1 33
34//! A Connexion links two lines of items in a set
35//! of lines. It s contains two points and their paramatric
36//! definitions on the lines.
37//! The items can be points or curves.
25e59720 38class MAT2d_Connexion : public Standard_Transient
42cf5bc1 39{
40
41public:
42
43
44 Standard_EXPORT MAT2d_Connexion();
45
46 Standard_EXPORT MAT2d_Connexion(const Standard_Integer LineA, const Standard_Integer LineB, const Standard_Integer ItemA, const Standard_Integer ItemB, const Standard_Real Distance, const Standard_Real ParameterOnA, const Standard_Real ParameterOnB, const gp_Pnt2d& PointA, const gp_Pnt2d& PointB);
47
48 //! Returns the Index on the first line.
49 Standard_EXPORT Standard_Integer IndexFirstLine() const;
50
51 //! Returns the Index on the Second line.
52 Standard_EXPORT Standard_Integer IndexSecondLine() const;
53
54 //! Returns the Index of the item on the first line.
55 Standard_EXPORT Standard_Integer IndexItemOnFirst() const;
56
57 //! Returns the Index of the item on the second line.
58 Standard_EXPORT Standard_Integer IndexItemOnSecond() const;
59
60 //! Returns the parameter of the point on the firstline.
61 Standard_EXPORT Standard_Real ParameterOnFirst() const;
62
63 //! Returns the parameter of the point on the secondline.
64 Standard_EXPORT Standard_Real ParameterOnSecond() const;
65
66 //! Returns the point on the firstline.
67 Standard_EXPORT gp_Pnt2d PointOnFirst() const;
68
69 //! Returns the point on the secondline.
70 Standard_EXPORT gp_Pnt2d PointOnSecond() const;
71
72 //! Returns the distance between the two points.
73 Standard_EXPORT Standard_Real Distance() const;
74
75 Standard_EXPORT void IndexFirstLine (const Standard_Integer anIndex);
76
77 Standard_EXPORT void IndexSecondLine (const Standard_Integer anIndex);
78
79 Standard_EXPORT void IndexItemOnFirst (const Standard_Integer anIndex);
80
81 Standard_EXPORT void IndexItemOnSecond (const Standard_Integer anIndex);
82
83 Standard_EXPORT void ParameterOnFirst (const Standard_Real aParameter);
84
85 Standard_EXPORT void ParameterOnSecond (const Standard_Real aParameter);
86
87 Standard_EXPORT void PointOnFirst (const gp_Pnt2d& aPoint);
88
89 Standard_EXPORT void PointOnSecond (const gp_Pnt2d& aPoint);
90
91 Standard_EXPORT void Distance (const Standard_Real aDistance);
92
93 //! Returns the reverse connexion of <me>.
94 //! the firstpoint is the secondpoint.
95 //! the secondpoint is the firstpoint.
96 Standard_EXPORT Handle(MAT2d_Connexion) Reverse() const;
97
98 //! Returns <True> if my firstPoint is on the same line
99 //! than the firstpoint of <aConnexion> and my firstpoint
100 //! is after the firstpoint of <aConnexion> on the line.
101 //! <aSense> = 1 if <aConnexion> is on the Left of its
102 //! firstline, else <aSense> = -1.
103 Standard_EXPORT Standard_Boolean IsAfter (const Handle(MAT2d_Connexion)& aConnexion, const Standard_Real aSense) const;
104
105 //! Print <me>.
106 Standard_EXPORT void Dump (const Standard_Integer Deep = 0, const Standard_Integer Offset = 0) const;
107
108
109
110
25e59720 111 DEFINE_STANDARD_RTTIEXT(MAT2d_Connexion,Standard_Transient)
42cf5bc1 112
113protected:
114
115
116
117
118private:
119
120
121 Standard_Integer lineA;
122 Standard_Integer lineB;
123 Standard_Integer itemA;
124 Standard_Integer itemB;
125 Standard_Real distance;
126 Standard_Real parameterOnA;
127 Standard_Real parameterOnB;
128 gp_Pnt2d pointA;
129 gp_Pnt2d pointB;
130
131
132};
133
134
135
136
137
138
139
140#endif // _MAT2d_Connexion_HeaderFile