0024275: Cppcheck warnings on uninitialized class members
[occt.git] / src / PBRep / PBRep_TEdge.cxx
CommitLineData
b311480e 1// Created on: 1993-07-26
2// Created by: Remi LEQUETTE
3// Copyright (c) 1993-1999 Matra Datavision
4// Copyright (c) 1999-2012 OPEN CASCADE SAS
5//
6// The content of this file is subject to the Open CASCADE Technology Public
7// License Version 6.5 (the "License"). You may not use the content of this file
8// except in compliance with the License. Please obtain a copy of the License
9// at http://www.opencascade.org and read it completely before using this file.
10//
11// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13//
14// The Original Code and all software distributed under the License is
15// distributed on an "AS IS" basis, without warranty of any kind, and the
16// Initial Developer hereby disclaims all such warranties, including without
17// limitation, any warranties of merchantability, fitness for a particular
18// purpose or non-infringement. Please see the License for the specific terms
19// and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23#include <PBRep_TEdge.ixx>
24
25static const Standard_Integer ParameterMask = 1;
26static const Standard_Integer RangeMask = 2;
27static const Standard_Integer DegeneratedMask = 4;
28
29//=======================================================================
30//function : PBRep_TEdge
31//purpose :
32//=======================================================================
33
c24d4017 34PBRep_TEdge::PBRep_TEdge() :
35 myTolerance(0.),
36 myFlags(0)
7fd59977 37{
38}
39
40//=======================================================================
41//function : Tolerance
42//purpose :
43//=======================================================================
44
45Standard_Real PBRep_TEdge::Tolerance()const
46{
47 return myTolerance;
48}
49
50
51//=======================================================================
52//function : Tolerance
53//purpose :
54//=======================================================================
55
56void PBRep_TEdge::Tolerance(const Standard_Real T)
57{
58 myTolerance = T;
59}
60
61
62//=======================================================================
63//function : SameParameter
64//purpose :
65//=======================================================================
66
67Standard_Boolean PBRep_TEdge::SameParameter()const
68{
69 return myFlags & ParameterMask;
70}
71
72
73//=======================================================================
74//function : SameParameter
75//purpose :
76//=======================================================================
77
78void PBRep_TEdge::SameParameter(const Standard_Boolean S)
79{
80 if (S) myFlags |= ParameterMask;
81 else myFlags &= ~ParameterMask;
82}
83
84
85//=======================================================================
86//function : SameRange
87//purpose :
88//=======================================================================
89
90 Standard_Boolean PBRep_TEdge::SameRange()const
91{
92 return myFlags & RangeMask;
93}
94
95
96//=======================================================================
97//function : SameRange
98//purpose :
99//=======================================================================
100
101 void PBRep_TEdge::SameRange(const Standard_Boolean S)
102{
103 if (S) myFlags |= RangeMask;
104 else myFlags &= ~RangeMask;
105}
106
107//=======================================================================
108//function : Degenerated
109//purpose :
110//=======================================================================
111
112Standard_Boolean PBRep_TEdge::Degenerated()const
113{
114 return myFlags & DegeneratedMask;
115}
116
117
118//=======================================================================
119//function : Degenerated
120//purpose :
121//=======================================================================
122
123void PBRep_TEdge::Degenerated(const Standard_Boolean S)
124{
125 if (S) myFlags |= DegeneratedMask;
126 else myFlags &= ~DegeneratedMask;
127}
128
129
130//=======================================================================
131//function : Curves
132//purpose :
133//=======================================================================
134
135Handle(PBRep_CurveRepresentation) PBRep_TEdge::Curves()const
136{
137 return myCurves;
138}
139
140
141//=======================================================================
142//function : Curves
143//purpose :
144//=======================================================================
145
146void PBRep_TEdge::Curves(const Handle(PBRep_CurveRepresentation)& C)
147{
148 myCurves = C;
149}
150
151