1 // File: HatchGen_Domain.lxx
2 // Created: Tue Jan 3 10:27:32 1995
3 // Author: Laurent BUCHARD
7 #include <Standard_DomainError.hxx>
9 //=======================================================================
10 // Function : SetPoints
11 // Purpose : Sets the first and the second points of the domain.
12 //=======================================================================
14 inline void HatchGen_Domain::SetPoints (const HatchGen_PointOnHatching& P1,
15 const HatchGen_PointOnHatching& P2)
17 myHasFirstPoint = Standard_True ;
19 myHasSecondPoint = Standard_True ;
23 //=======================================================================
24 // Function : SetPoints
25 // Purpose : Sets the first and the second points of the domain at the
27 //=======================================================================
29 inline void HatchGen_Domain::SetPoints ()
31 myHasFirstPoint = Standard_False ;
32 myHasSecondPoint = Standard_False ;
35 //=======================================================================
36 // Function : SetFirstPoint
37 // Purpose : Sets the first point of the domain.
38 //=======================================================================
40 inline void HatchGen_Domain::SetFirstPoint (const HatchGen_PointOnHatching& P)
42 myHasFirstPoint = Standard_True ;
46 //=======================================================================
47 // Function : SetFirstPoint
48 // Purpose : Sets the first point of the domain at the infinite.
49 //=======================================================================
51 inline void HatchGen_Domain::SetFirstPoint ()
53 myHasFirstPoint = Standard_False ;
56 //=======================================================================
57 // Function : SetSecondPoint
58 // Purpose : Sets the second point of the domain.
59 //=======================================================================
61 inline void HatchGen_Domain::SetSecondPoint (const HatchGen_PointOnHatching& P)
63 myHasSecondPoint = Standard_True ;
67 //=======================================================================
68 // Function : SetSecondPoint
69 // Purpose : Sets the second point of the domain at the infinite.
70 //=======================================================================
72 inline void HatchGen_Domain::SetSecondPoint ()
74 myHasSecondPoint = Standard_False ;
77 //=======================================================================
78 // Function : HasFirstPoint
79 // Purpose : Returns True if the domain has a first point.
80 //=======================================================================
82 inline Standard_Boolean HatchGen_Domain::HasFirstPoint () const
84 return myHasFirstPoint ;
87 //=======================================================================
88 // Function : FirstPoint
89 // Purpose : Returns the first point of the domain.
90 //=======================================================================
92 inline const HatchGen_PointOnHatching& HatchGen_Domain::FirstPoint () const
94 Standard_DomainError_Raise_if (!myHasFirstPoint, "HatchGen_Domain::FirstPoint") ;
98 //=======================================================================
99 // Function : HasSecondPoint
100 // Purpose : Returns True if the domain has a second point.
101 //=======================================================================
103 inline Standard_Boolean HatchGen_Domain::HasSecondPoint () const
105 return myHasSecondPoint ;
108 //=======================================================================
109 // Function : SecondPoint
110 // Purpose : Returns the second of the domain.
111 //=======================================================================
113 inline const HatchGen_PointOnHatching& HatchGen_Domain::SecondPoint () const
115 Standard_DomainError_Raise_if (!myHasSecondPoint, "HatchGen_Domain::SecondPoint") ;
116 return mySecondPoint ;