82 static GEOMDLLIMPEXP
DRange1d From (
double valueA,
double valueB);
85 static GEOMDLLIMPEXP
DRange1d From (
double valueA,
double valueB,
double valueC);
88 static GEOMDLLIMPEXP
DRange1d From (
double *values,
size_t n);
95 bool GEOMDLLIMPEXP
IsNull ()
const;
98 bool GEOMDLLIMPEXP
IsEmpty ()
const;
123 bool GEOMDLLIMPEXP
GetLowHigh (
double &a,
double &b)
const;
126 double GEOMDLLIMPEXP
Low ()
const;
128 double GEOMDLLIMPEXP
High ()
const;
135 double GEOMDLLIMPEXP
Length ()
const;
138 bool GEOMDLLIMPEXP
Contains (
double a)
const;
141 void GEOMDLLIMPEXP
Extend (
double valueA);
143 void GEOMDLLIMPEXP
Extend (
double valueA,
double valueB);
145 void GEOMDLLIMPEXP
Extend (
double *values,
size_t count);
181 double GEOMDLLIMPEXP
MaxAbs (
double defaultValeForNullRange = 0.0)
const;
197 bool GEOMDLLIMPEXP
FractionToDouble (
double fraction,
double &x,
double defaultReturnX = 0.0)
const;
199 bool GEOMDLLIMPEXP
DoubleToFraction (
double x,
double &fraction,
double defaultReturnX = 0.0)
const;
203 double GEOMDLLIMPEXP
GetTolerance (
double absTol = 1.0e-14,
double localRelTol = 1.0e-14,
double globalRelTol = 0.0);
bool FractionToDouble(double fraction, double &x, double defaultReturnX=0.0) const
map fractional coordinate to real. Returns false if null range.
bool HasNonEmptyIntersectionWith(DRange1dCR other) const
Test if the instance range is a (possibly complete, but not empty) subset of {other} range...
static DRange1d FromLowHigh(double low, double high)
Return a range with explicit (possibly reversed) low and high.
DRange1d()
constructor for a NULL range.
double Length() const
Return {MAX(0, high - low)} The DRange1::NullRange returns 0.
static DRange1d ZeroAndPositiveRange()
Return a complete 0 and positive range (0 to DBL_MAX)
static void SortLowInPlace(bvector< DRange1d > &data)
Sort on low values.
void Extend(double valueA)
Extend to include a value.
bool IsInfiniteNegative() const
Test if the range has the most negative possible {low}.
static DRange1d FromUnion(DRange1dCR rangeA, DRange1dCR rangeB)
return the (possibly null) union of two ranges.
bool GetLowHigh(double &a, double &b) const
Get the low and high limits (unchecked).
static void IntersectSorted(bvector< DRange1d > &dataA, bvector< DRange1d > &dataB, bvector< DRange1d > &dataOut)
Intersect intervals in two pre-sorted sets. Output may NOT be the same as either input.
bool IsContainedIn(DRange1dCR other) const
Test if the instnace range is a (possibly complete) subset of {other} range.
#define END_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:30
static DRange1d FromExtent(bvector< DRange1d > &data)
Return the encompassing single range.
static bool IsIncreasing(bvector< DRange1d > &data, bool allowZeroLength=false, bool allowZeroGaps=false)
Test for increasing relationships, optionally allowing zero length.
static DRange1d FromIntersection(DRange1dCR rangeA, DRange1dCR rangeB)
return the (possibly null) intersection of two ranges.
size_type count(const key_type &__x) const
Definition: stdcxx/bstdmap.h:277
bool UpdateRay1dIntersection(double x0, double dxds, double xA, double xB)
Update a bounding interval of a line based on the variation of that line within one dimension...
struct DRange1d const & DRange1dCR
Definition: msgeomstructs_typedefs.h:102
static DRange1d From(double value)
Return a range containing a single value.
static double LengthSum(bvector< DRange1d > &data)
Sum the interval lengths.
bool IsEmpty() const
Test if the range has {low > high}, i.e. there are no x for which {low &le x && x &le high}...
static DRange1d NullRange()
Return a range which satisfies IsNull ()
bool Contains(double a) const
Test if the range contains a given value.
bool IsSinglePoint() const
Test if the range is a single point.
bool IsDoublyInfinite() const
Test if the range has the most negative {low} and most positive {high}.
bool IsNull() const
Test if the range is exactly the same as the null ranges returned by NullRange ().
double Low() const
Get the low limit (unchecked).
static void AppendClips(bvector< DRange1d > &dataA, DRange1dCR clipper, bvector< DRange1d > &dataOut)
Intersect each range in dataA with clipper.
void ExtendBySignedShift(double tol)
If non empty, shift endpoints by (-tol, +tol).
double GetTolerance(double absTol=1.0e-14, double localRelTol=1.0e-14, double globalRelTol=0.0)
return a tolerance computed as {absTol + localRelTol * Extent() + globalRelTol * MaxAbs ()} ...
static void SimplifyInPlace(bvector< DRange1d > &data)
Combine intervals so there are no overlaps.
double low
low point of box
Definition: DRange1d.h:45
static DRange1d ZeroAndNegativeRange()
Return a complete 0 and negative range (-DBL_MAX to 0)
double MaxAbs(double defaultValeForNullRange=0.0) const
return the largest coordinate (absolute value) in the range.
bool IsEqualInterval(DRange1dCR other) const
Test if equal intervals in point set sense.
double high
high point of box
Definition: DRange1d.h:47
struct DPlane3d const & DPlane3dCR
Definition: msgeomstructs_typedefs.h:113
bool IsSameLowHigh(DRange1dCR other, double relTol) const
test for toleranced equality of low to low and high to high
bool IsEqualLowHigh(DRange1dCR other) const
Direct equality test for low and high parts.
bool IsSameMinMax(DRange1dCR other, double absTol) const
test for toleranced equality of (min max of) low and high.
A 1d interval with low and high values.
Definition: DRange1d.h:41
bool StrictlyNonEmptyFractionalIntersection(DRange1dCR rangeB, DRange1dR fractionalIntersection)
Compute intersection of the instance with rangeB.
static DRange1d InfiniteRange()
Return a complete range (-DBL_MAX to DBL_MAX)
static void UnionSorted(bvector< DRange1d > &dataA, bvector< DRange1d > &dataB, bvector< DRange1d > &dataOut)
Union of intervals in two pre-sorted sets. Output may NOT be the same as either input.
bool IsSubsetOf(DRange1dCR other) const
Test if the instance range is a (possibly complete, possibly empty) subset of {other} range...
static DRange1d FromAltitudes(bvector< DPoint3d > &points, DPlane3dCR plane)
Return a (sorted) range of altitudes of points.
double High() const
Get the low limit (unchecked).
bool IsPositiveLength() const
Test if the range has {high > low}, i.e. has a non-empty set of points with properly sorted lower and...
void InitNull()
Set this range to the {NullRange}.
#define BEGIN_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:29
bool IsEmptyOrSinglePoint() const
Test if the range has {high >= low}, i.e. is empty or just one point.
struct DRange1d & DRange1dR
Definition: msgeomstructs_typedefs.h:102
static void ClipInPlace(bvector< DRange1d > &dataA, DRange1dCR clipper)
Intersect each range in dataA with clipper. Retain non-empty result parts.
bool HasPositiveLengthIntersectionWith(DRange1dCR other) const
Test if the instance range has a positive-length (more than single point) intersection with {other}...
void IntersectInPlace(DRange1dCR other)
Restrict to overlap with another (possibly null!!) range.
static void DifferenceSorted(bvector< DRange1d > &dataA, bvector< DRange1d > &dataB, bvector< DRange1d > &dataOut)
Intersect intervals in two pre-sorted sets. Output may NOT be the same as either input.
bool DoubleToFraction(double x, double &fraction, double defaultReturnX=0.0) const
map real to fraction. Returns false if null range or single point.
bool IsInfinitePositive() const
Test if the range has the largest possible {high}.