Integration of OCCT 6.5.0 from SVN
[occt.git] / src / Aspect / Aspect_Edge.cxx
1
2 // File         Aspect_Edge.cxx
3 // Created      Fevrier 1992
4 // Author       NW,JPB,CAL
5
6 //-Copyright    MatraDatavision 1991,1992
7
8 //-Version      
9
10 //-Design       Declaration des variables specifiques aux aretes
11
12 //-Warning      Une arete est definie par :
13 //              - les 2 sommets references par des indices
14 //              - la visibilite
15
16 //-References   
17
18 //-Language     C++ 2.0
19
20 //-Declarations
21
22 // for the class
23 #include <Aspect_Edge.ixx>
24
25 //-Aliases
26
27 //-Global data definitions
28
29 //      -- les indices des sommets extremite
30 //      MyBegin         :       Standard_Integer;
31 //      MyEnd           :       Standard_Integer;
32
33 //      -- la visibilite
34 //      MyVisibility    :       TypeOfEdge;
35
36 //-Constructors
37
38 //-Destructors
39
40 //-Methods, in order
41
42 Aspect_Edge::Aspect_Edge () {
43
44         MyBegin         = 0;
45         MyEnd           = 0;
46         MyVisibility    = Aspect_TOE_INVISIBLE;
47
48 }
49
50 Aspect_Edge::Aspect_Edge (const Standard_Integer AIndex1, const Standard_Integer AIndex2, const Aspect_TypeOfEdge AType) {
51
52         if (AIndex1 == AIndex2)
53                 Aspect_EdgeDefinitionError::Raise ("Bad index for the edge");
54
55         MyBegin         = AIndex1;
56         MyEnd           = AIndex2;
57         MyVisibility    = AType;
58
59 }
60
61 void Aspect_Edge::SetValues (const Standard_Integer AIndex1, const Standard_Integer AIndex2, const Aspect_TypeOfEdge AType) {
62
63         if (AIndex1 == AIndex2)
64                 Aspect_EdgeDefinitionError::Raise ("Bad index for the edge");
65
66         MyBegin         = AIndex1;
67         MyEnd           = AIndex2;
68         MyVisibility    = AType;
69
70 }
71
72 void Aspect_Edge::Values (Standard_Integer& AIndex1, Standard_Integer& AIndex2, Aspect_TypeOfEdge& AType) const {
73
74         AIndex1 = MyBegin;
75         AIndex2 = MyEnd;
76         AType   = MyVisibility;
77
78 }
79
80 Standard_Integer Aspect_Edge::FirstIndex () const {
81
82         return (MyBegin);
83
84 }
85
86 Standard_Integer Aspect_Edge::LastIndex () const {
87
88         return (MyEnd);
89
90 }
91
92 Aspect_TypeOfEdge Aspect_Edge::Type () const {
93
94         return (MyVisibility);
95
96 }