7fd59977 |
1 | // File: HatchGen_Domain.lxx |
2 | // Created: Tue Jan 3 10:27:32 1995 |
3 | // Author: Laurent BUCHARD |
4 | // <lbr@mastox> |
5 | |
6 | |
7 | #include <Standard_DomainError.hxx> |
8 | |
9 | //======================================================================= |
10 | // Function : SetPoints |
11 | // Purpose : Sets the first and the second points of the domain. |
12 | //======================================================================= |
13 | |
14 | inline void HatchGen_Domain::SetPoints (const HatchGen_PointOnHatching& P1, |
15 | const HatchGen_PointOnHatching& P2) |
16 | { |
17 | myHasFirstPoint = Standard_True ; |
18 | myFirstPoint = P1 ; |
19 | myHasSecondPoint = Standard_True ; |
20 | mySecondPoint = P2 ; |
21 | } |
22 | |
23 | //======================================================================= |
24 | // Function : SetPoints |
25 | // Purpose : Sets the first and the second points of the domain at the |
26 | // infinite. |
27 | //======================================================================= |
28 | |
29 | inline void HatchGen_Domain::SetPoints () |
30 | { |
31 | myHasFirstPoint = Standard_False ; |
32 | myHasSecondPoint = Standard_False ; |
33 | } |
34 | |
35 | //======================================================================= |
36 | // Function : SetFirstPoint |
37 | // Purpose : Sets the first point of the domain. |
38 | //======================================================================= |
39 | |
40 | inline void HatchGen_Domain::SetFirstPoint (const HatchGen_PointOnHatching& P) |
41 | { |
42 | myHasFirstPoint = Standard_True ; |
43 | myFirstPoint = P ; |
44 | } |
45 | |
46 | //======================================================================= |
47 | // Function : SetFirstPoint |
48 | // Purpose : Sets the first point of the domain at the infinite. |
49 | //======================================================================= |
50 | |
51 | inline void HatchGen_Domain::SetFirstPoint () |
52 | { |
53 | myHasFirstPoint = Standard_False ; |
54 | } |
55 | |
56 | //======================================================================= |
57 | // Function : SetSecondPoint |
58 | // Purpose : Sets the second point of the domain. |
59 | //======================================================================= |
60 | |
61 | inline void HatchGen_Domain::SetSecondPoint (const HatchGen_PointOnHatching& P) |
62 | { |
63 | myHasSecondPoint = Standard_True ; |
64 | mySecondPoint = P ; |
65 | } |
66 | |
67 | //======================================================================= |
68 | // Function : SetSecondPoint |
69 | // Purpose : Sets the second point of the domain at the infinite. |
70 | //======================================================================= |
71 | |
72 | inline void HatchGen_Domain::SetSecondPoint () |
73 | { |
74 | myHasSecondPoint = Standard_False ; |
75 | } |
76 | |
77 | //======================================================================= |
78 | // Function : HasFirstPoint |
79 | // Purpose : Returns True if the domain has a first point. |
80 | //======================================================================= |
81 | |
82 | inline Standard_Boolean HatchGen_Domain::HasFirstPoint () const |
83 | { |
84 | return myHasFirstPoint ; |
85 | } |
86 | |
87 | //======================================================================= |
88 | // Function : FirstPoint |
89 | // Purpose : Returns the first point of the domain. |
90 | //======================================================================= |
91 | |
92 | inline const HatchGen_PointOnHatching& HatchGen_Domain::FirstPoint () const |
93 | { |
94 | Standard_DomainError_Raise_if (!myHasFirstPoint, "HatchGen_Domain::FirstPoint") ; |
95 | return myFirstPoint ; |
96 | } |
97 | |
98 | //======================================================================= |
99 | // Function : HasSecondPoint |
100 | // Purpose : Returns True if the domain has a second point. |
101 | //======================================================================= |
102 | |
103 | inline Standard_Boolean HatchGen_Domain::HasSecondPoint () const |
104 | { |
105 | return myHasSecondPoint ; |
106 | } |
107 | |
108 | //======================================================================= |
109 | // Function : SecondPoint |
110 | // Purpose : Returns the second of the domain. |
111 | //======================================================================= |
112 | |
113 | inline const HatchGen_PointOnHatching& HatchGen_Domain::SecondPoint () const |
114 | { |
115 | Standard_DomainError_Raise_if (!myHasSecondPoint, "HatchGen_Domain::SecondPoint") ; |
116 | return mySecondPoint ; |
117 | } |