0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead...
[occt.git] / src / HLRAlgo / HLRAlgo_BiPoint.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-06-22
2// Created by: Christophe MARION
3// Copyright (c) 1995-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _HLRAlgo_BiPoint_HeaderFile
18#define _HLRAlgo_BiPoint_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Integer.hxx>
25#include <Standard_Real.hxx>
26#include <Standard_Boolean.hxx>
27#include <Standard_Address.hxx>
28
29
30
31class HLRAlgo_BiPoint
32{
33public:
34
35 DEFINE_STANDARD_ALLOC
36
dde68833 37 HLRAlgo_BiPoint() {}
38
42cf5bc1 39 Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl);
40
dde68833 41 Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer flag);
42cf5bc1 42
43 Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl);
44
dde68833 45 Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer flag);
42cf5bc1 46
47 Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i2, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl);
48
dde68833 49 Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i2, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer flag);
42cf5bc1 50
dde68833 51 Standard_Boolean Rg1Line() const { return (myIndices[9] & EMskRg1Line) != 0; }
42cf5bc1 52
dde68833 53 void Rg1Line (const Standard_Boolean B)
54 {
55 if (B) myIndices[9] |= EMskRg1Line;
56 else myIndices[9] &= ~EMskRg1Line;
57 }
42cf5bc1 58
dde68833 59 Standard_Boolean RgNLine() const { return (myIndices[9] & EMskRgNLine) != 0; }
42cf5bc1 60
dde68833 61 void RgNLine (const Standard_Boolean B)
62 {
63 if (B) myIndices[9] |= EMskRgNLine;
64 else myIndices[9] &= ~EMskRgNLine;
65 }
42cf5bc1 66
dde68833 67 Standard_Boolean OutLine() const { return (myIndices[9] & EMskOutLine) != 0; }
42cf5bc1 68
dde68833 69 void OutLine (const Standard_Boolean B)
70 {
71 if (B) myIndices[9] |= EMskOutLine;
72 else myIndices[9] &= ~EMskOutLine;
73 }
42cf5bc1 74
dde68833 75 Standard_Boolean IntLine() const { return (myIndices[9] & EMskIntLine) != 0; }
42cf5bc1 76
dde68833 77 void IntLine (const Standard_Boolean B)
78 {
79 if (B) myIndices[9] |= EMskIntLine;
80 else myIndices[9] &= ~EMskIntLine;
81 }
42cf5bc1 82
dde68833 83 Standard_Boolean Hidden() const { return (myIndices[9] & EMskHidden) != 0; }
42cf5bc1 84
dde68833 85 void Hidden (const Standard_Boolean B)
86 {
87 if (B) myIndices[9] |= EMskHidden;
88 else myIndices[9] &= ~EMskHidden;
89 }
42cf5bc1 90
dde68833 91 Standard_Address Indices() const { return const_cast<Standard_Integer* >(myIndices); }
42cf5bc1 92
dde68833 93 Standard_Address Coordinates() const { return const_cast<Standard_Real* >(myCoordinates); }
42cf5bc1 94
dde68833 95protected:
42cf5bc1 96
dde68833 97 enum EMskFlags
98 {
99 EMskRg1Line = 1,
100 EMskRgNLine = 2,
101 EMskOutLine = 4,
102 EMskIntLine = 8,
103 EMskHidden = 16
104 };
42cf5bc1 105
dde68833 106private:
42cf5bc1 107
dde68833 108 Standard_Integer myIndices[10];
109 Standard_Real myCoordinates[12];
42cf5bc1 110
dde68833 111};
42cf5bc1 112
113#endif // _HLRAlgo_BiPoint_HeaderFile