7fd59977 |
1 | -- File: EdgeStatus.cdl |
2 | -- Created: Tue Feb 18 10:36:07 1992 |
3 | -- Author: Christophe MARION |
4 | -- <cma@sdsun1> |
5 | ---Copyright: Matra Datavision 1992 |
6 | |
7 | class EdgeStatus from HLRAlgo |
8 | |
9 | ---Purpose: This class describes the Hidden Line status of an |
10 | -- Edge. It contains : |
11 | -- |
12 | -- The Bounds of the Edge and their tolerances |
13 | -- |
14 | -- Two flags indicating if the edge is full visible |
15 | -- or full hidden. |
16 | -- |
17 | -- The Sequence of visible Intervals on the Edge. |
18 | |
19 | uses |
20 | Integer from Standard, |
21 | ShortReal from Standard, |
22 | Real from Standard, |
23 | Boolean from Standard, |
24 | Intervals from Intrv |
25 | |
26 | raises |
27 | OutOfRange |
28 | |
29 | is |
30 | Create returns EdgeStatus from HLRAlgo; |
31 | |
32 | Create(Start : Real from Standard; |
33 | TolStart : ShortReal from Standard; |
34 | End : Real from Standard; |
35 | TolEnd : ShortReal from Standard) |
36 | returns EdgeStatus from HLRAlgo; |
37 | ---Purpose: Creates a new EdgeStatus. Default visible. The |
38 | -- Edge is bounded by the interval <Start>, <End> |
39 | -- with the tolerances <TolStart>, <TolEnd>. |
40 | |
41 | Initialize(me : in out; |
42 | Start : Real from Standard; |
43 | TolStart : ShortReal from Standard; |
44 | End : Real from Standard; |
45 | TolEnd : ShortReal from Standard) |
46 | ---Purpose: Initialize an EdgeStatus. Default visible. The |
47 | -- Edge is bounded by the interval <Start>, <End> |
48 | -- with the tolerances <TolStart>, <TolEnd>. |
49 | is static; |
50 | |
51 | Bounds (me;Start : out Real from Standard; |
52 | TolStart : out ShortReal from Standard; |
53 | End : out Real from Standard; |
54 | TolEnd : out ShortReal from Standard) |
55 | ---C++: inline |
56 | is static; |
57 | |
58 | NbVisiblePart(me) returns Integer from Standard |
59 | is static; |
60 | |
61 | VisiblePart(me; Index : Integer from Standard; |
62 | Start : out Real from Standard; |
63 | TolStart : out ShortReal from Standard; |
64 | End : out Real from Standard; |
65 | TolEnd : out ShortReal from Standard) |
66 | is static; |
67 | |
68 | Hide(me : in out; Start : Real from Standard; |
69 | TolStart : ShortReal from Standard; |
70 | End : Real from Standard; |
71 | TolEnd : ShortReal from Standard; |
72 | OnFace : Boolean from Standard; |
73 | OnBoundary : Boolean from Standard) |
74 | ---Purpose: Hides the interval <Start>, <End> with the |
75 | -- tolerances <TolStart>, <TolEnd>. This interval is |
76 | -- subtracted from the visible parts. If the hidden |
77 | -- part is on ( or under ) the face the flag <OnFace> |
78 | -- is True ( or False ). If the hidden part is on ( |
79 | -- or inside ) the boundary of the face the flag |
80 | -- <OnBoundary> is True ( or False ). |
81 | is static; |
82 | |
83 | HideAll(me : in out) |
84 | ---C++: inline |
85 | ---Purpose: Hide the whole Edge. |
86 | is static; |
87 | |
88 | ShowAll(me : in out) |
89 | ---C++: inline |
90 | ---Purpose: Show the whole Edge. |
91 | is static; |
92 | |
93 | AllHidden(me) returns Boolean from Standard |
94 | ---C++: inline |
95 | is static; |
96 | |
97 | AllHidden(me : in out; B : Boolean from Standard) |
98 | ---C++: inline |
99 | is static; |
100 | |
101 | AllVisible(me) returns Boolean from Standard |
102 | ---C++: inline |
103 | is static; |
104 | |
105 | AllVisible(me : in out; B : Boolean from Standard) |
106 | ---C++: inline |
107 | is static; |
108 | |
109 | fields |
110 | myStart : Real from Standard; |
111 | myEnd : Real from Standard; |
112 | myTolStart : ShortReal from Standard; |
113 | myTolEnd : ShortReal from Standard; |
114 | myFlags : Boolean from Standard; |
115 | myVisibles : Intervals from Intrv; |
116 | |
117 | end EdgeStatus; |