1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00
occt/src/IntCurve/IntCurve_Polygon2dGen.lxx

46 lines
1.8 KiB
Plaintext
Executable File

// File: IntCurve_Polygon2dGen.lxx
// Created: Thu 3 Jun 1993
// Author: Laurent BUCHARD
#include <Standard_OutOfRange.hxx>
//======================================================================
inline Standard_Real IntCurve_Polygon2dGen::DeflectionOverEstimation() const {
return(TheDeflection);
}//======================================================================
inline void IntCurve_Polygon2dGen::SetDeflectionOverEstimation
(const Standard_Real x) {
TheDeflection = x;
myBox.Enlarge(TheDeflection);
}
//======================================================================
inline void IntCurve_Polygon2dGen::Closed(const Standard_Boolean flag) {
ClosedPolygon = flag;
}
//======================================================================
inline Standard_Integer IntCurve_Polygon2dGen::NbSegments(void) const {
return((ClosedPolygon)? NbPntIn : NbPntIn-1);
}
//======================================================================
inline Standard_Real IntCurve_Polygon2dGen::InfParameter() const {
return(TheParams.Value(TheIndex(1)));
}
//======================================================================
inline Standard_Real IntCurve_Polygon2dGen::SupParameter() const {
return(TheParams.Value(TheIndex(NbPntIn)));
}
//======================================================================
//======================================================================
inline Standard_Integer IntCurve_Polygon2dGen::CalculRegion(const Standard_Real x,
const Standard_Real y,
const Standard_Real x1,
const Standard_Real x2,
const Standard_Real y1,
const Standard_Real y2) const {
Standard_Integer r;
if(x<x1) { r=1; } else { if(x>x2) { r=2; } else { r=0; } }
if(y<y1) { r|=4; } else { if(y>y2) { r|=8; } }
return(r);
}