0022627: Change OCCT memory management defaults
[occt.git] / src / IntRes2d / IntRes2d_Intersection.lxx
CommitLineData
7fd59977 1// File: IntRes2d_Intersection.lxx
2// Created: Wed May 27 16:17:41 1992
3// Author: Laurent BUCHARD
4// <lbr@topsn3>
5
6
7#include <StdFail_NotDone.hxx>
8#include <Standard_OutOfRange.hxx>
9
10
11inline Standard_Boolean IntRes2d_Intersection::IsDone() const {
12 return done;
13}
14
15//----------------------------------------------------------------------
16inline IntRes2d_Intersection::IntRes2d_Intersection() {
17 done=reverse=Standard_False;
18}
19//----------------------------------------------------------------------
20inline IntRes2d_Intersection::IntRes2d_Intersection(const IntRes2d_Intersection& Other) {
21 done=reverse=Standard_False;
22 lpnt = Other.lpnt;
23 lseg = Other.lseg;
24}
25//----------------------------------------------------------------------
26inline Standard_Boolean IntRes2d_Intersection::IsEmpty() const {
27 if (!done) {StdFail_NotDone::Raise();}
28 return ((lpnt.Length() == 0) && (lseg.Length() == 0));
29}
30//----------------------------------------------------------------------
31inline Standard_Integer IntRes2d_Intersection::NbPoints() const {
32 if (!done) {StdFail_NotDone::Raise();}
33 return lpnt.Length();
34}
35//----------------------------------------------------------------------
36inline const IntRes2d_IntersectionPoint&
37 IntRes2d_Intersection::Point( const Standard_Integer N) const {
38 if (!done) {StdFail_NotDone::Raise();}
39 return lpnt(N);
40 }
41//----------------------------------------------------------------------
42inline Standard_Integer IntRes2d_Intersection::NbSegments() const {
43 if (!done) {StdFail_NotDone::Raise();}
44 return lseg.Length();
45}
46//----------------------------------------------------------------------
47inline const IntRes2d_IntersectionSegment&
48 IntRes2d_Intersection::Segment(const Standard_Integer N) const {
49 if (!done) {StdFail_NotDone::Raise();}
50 return lseg(N);
51 }
52//----------------------------------------------------------------------
53inline void IntRes2d_Intersection::Append(const IntRes2d_IntersectionSegment& Seg) {
54 lseg.Append(Seg);
55}
56//----------------------------------------------------------------------
57inline void IntRes2d_Intersection::Append(const IntRes2d_IntersectionPoint& Pnt) {
58 lpnt.Append(Pnt);
59}
60//----------------------------------------------------------------------
61inline void IntRes2d_Intersection::ResetFields() {
62 if(done) {
63 lseg.Clear();
64 lpnt.Clear();
65 done=Standard_False;
66 }
67}
68//----------------------------------------------------------------------
69inline void IntRes2d_Intersection::SetReversedParameters(const Standard_Boolean flag) {
70 reverse=flag;
71}
72//----------------------------------------------------------------------
73inline Standard_Boolean IntRes2d_Intersection::ReversedParameters() const {
74 return(reverse);
75}