summaryrefslogtreecommitdiff
path: root/inc/HatchGen_Domain.lxx
blob: 8641fdeca5e8c2718e6986a251036e46d38a73e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// File:	HatchGen_Domain.lxx
// Created:	Tue Jan  3 10:27:32 1995
// Author:	Laurent BUCHARD
//		<lbr@mastox>


#include <Standard_DomainError.hxx>

//=======================================================================
// Function : SetPoints
// Purpose  : Sets the first and the second points of the domain.
//=======================================================================

inline void HatchGen_Domain::SetPoints (const HatchGen_PointOnHatching& P1,
				 const HatchGen_PointOnHatching& P2)
{
  myHasFirstPoint  = Standard_True ;
  myFirstPoint     = P1 ;
  myHasSecondPoint = Standard_True ;
  mySecondPoint    = P2 ;
}

//=======================================================================
// Function : SetPoints
// Purpose  : Sets the first and the second points of the domain at the
//            infinite.
//=======================================================================

inline void HatchGen_Domain::SetPoints ()
{
  myHasFirstPoint  = Standard_False ;
  myHasSecondPoint = Standard_False ;
}

//=======================================================================
// Function : SetFirstPoint
// Purpose  : Sets the first point of the domain.
//=======================================================================

inline void HatchGen_Domain::SetFirstPoint (const HatchGen_PointOnHatching& P)
{
  myHasFirstPoint  = Standard_True ;
  myFirstPoint     = P ;
}

//=======================================================================
// Function : SetFirstPoint
// Purpose  : Sets the first point of the domain at the infinite.
//=======================================================================

inline void HatchGen_Domain::SetFirstPoint ()
{
  myHasFirstPoint  = Standard_False ;
}

//=======================================================================
// Function : SetSecondPoint
// Purpose  : Sets the second point of the domain.
//=======================================================================

inline void HatchGen_Domain::SetSecondPoint (const HatchGen_PointOnHatching& P)
{
  myHasSecondPoint = Standard_True ;
  mySecondPoint    = P ;
}

//=======================================================================
// Function : SetSecondPoint
// Purpose  : Sets the second point of the domain at the infinite.
//=======================================================================

inline void HatchGen_Domain::SetSecondPoint ()
{
  myHasSecondPoint = Standard_False ;
}

//=======================================================================
// Function : HasFirstPoint
// Purpose  : Returns True if the domain has a first point.
//=======================================================================

inline Standard_Boolean HatchGen_Domain::HasFirstPoint () const
{
  return myHasFirstPoint ;
}

//=======================================================================
// Function : FirstPoint
// Purpose  : Returns the first point of the domain.
//=======================================================================

inline const HatchGen_PointOnHatching& HatchGen_Domain::FirstPoint () const
{
  Standard_DomainError_Raise_if (!myHasFirstPoint, "HatchGen_Domain::FirstPoint") ;
  return myFirstPoint ;
}

//=======================================================================
// Function : HasSecondPoint
// Purpose  : Returns True if the domain has a second point.
//=======================================================================

inline Standard_Boolean HatchGen_Domain::HasSecondPoint () const
{
  return myHasSecondPoint ;
}

//=======================================================================
// Function : SecondPoint
// Purpose  : Returns the second of the domain.
//=======================================================================

inline const HatchGen_PointOnHatching& HatchGen_Domain::SecondPoint () const
{
  Standard_DomainError_Raise_if (!myHasSecondPoint, "HatchGen_Domain::SecondPoint") ;
  return mySecondPoint ;
}