AngleInterval
represents closed intervals of arbitrary angles.
More...
#include <AngleInterval.h>
AngleInterval
represents closed intervals of arbitrary angles.
Definition at line 39 of file AngleInterval.h.
◆ AngleInterval() [1/4]
lsst::sphgeom::AngleInterval::AngleInterval |
( |
| ) |
|
|
inline |
◆ AngleInterval() [2/4]
lsst::sphgeom::AngleInterval::AngleInterval |
( |
Angle |
x | ) |
|
|
inlineexplicit |
◆ AngleInterval() [3/4]
lsst::sphgeom::AngleInterval::AngleInterval |
( |
Angle |
x, |
|
|
Angle |
y |
|
) |
| |
|
inline |
◆ AngleInterval() [4/4]
lsst::sphgeom::AngleInterval::AngleInterval |
( |
Base const & |
base | ) |
|
|
inline |
◆ clippedTo() [1/2]
clippedTo
returns the intersection of this interval and x.
Definition at line 183 of file Interval.h.
◆ clippedTo() [2/2]
clippedTo
returns the intersection of this interval and x.
Definition at line 185 of file Interval.h.
◆ clipTo() [1/2]
clipTo
shrinks this interval until all its points are in x.
Definition at line 159 of file Interval.h.
◆ clipTo() [2/2]
clipTo
shrinks this interval until all its points are in x.
Definition at line 170 of file Interval.h.
◆ contains() [1/2]
contains
returns true if the intersection of this interval and x is equal to x.
Definition at line 98 of file Interval.h.
99 return (_a <=
x &&
x <= _b) ||
x !=
x;
◆ contains() [2/2]
contains
returns true if the intersection of this interval and x is equal to x.
Definition at line 102 of file Interval.h.
108 return _a <=
x._a && _b >=
x._b;
◆ dilateBy()
For positive x, dilateBy
morphologically dilates this interval by [-x,x], which is equivalent to the taking the Minkowski sum with [-x,x].
For negative x, it morphologically erodes this interval by [x,-x]. If x is zero or NaN, or this interval is empty, there is no effect.
Definition at line 230 of file Interval.h.
◆ dilatedBy()
◆ empty()
◆ erodeBy()
◆ erodedBy()
◆ expandedTo() [1/2]
expandedTo
returns the smallest interval containing the union of this interval and x.
Definition at line 218 of file Interval.h.
◆ expandedTo() [2/2]
expandedTo
returns the smallest interval containing the union of this interval and x.
Definition at line 220 of file Interval.h.
◆ expandTo() [1/2]
expandTo
minimally expands this interval to contain x.
Definition at line 192 of file Interval.h.
◆ expandTo() [2/2]
expandTo
minimally expands this interval to contain x.
Definition at line 204 of file Interval.h.
207 }
else if (!
x.isEmpty()) {
◆ fromDegrees()
static AngleInterval lsst::sphgeom::AngleInterval::fromDegrees |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
inlinestatic |
◆ fromRadians()
static AngleInterval lsst::sphgeom::AngleInterval::fromRadians |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
inlinestatic |
◆ full()
◆ getA()
getA
returns the lower endpoint of this interval.
The return value for empty intervals is arbitrary.
Definition at line 76 of file Interval.h.
◆ getB()
getB
returns the upper endpoint of this interval.
The return value for empty intervals is arbitrary.
Definition at line 80 of file Interval.h.
◆ getCenter()
getCenter
returns the center of this interval.
It is arbitrary for empty intervals.
Definition at line 89 of file Interval.h.
89 {
return 0.5 * (_a + _b); }
◆ getSize()
getSize
returns the size (length, width) of this interval.
It is zero for single-point intervals, and NaN or negative for empty intervals.
Definition at line 93 of file Interval.h.
◆ intersects() [1/2]
intersects
returns true if the intersection of this interval and x is non-empty.
Definition at line 130 of file Interval.h.
130 {
return _a <=
x &&
x <= _b; }
◆ intersects() [2/2]
intersects
returns true if the intersection of this interval and x is non-empty.
Definition at line 132 of file Interval.h.
◆ isDisjointFrom() [1/2]
isDisjointFrom
returns true if the intersection of this interval and x is empty.
Definition at line 115 of file Interval.h.
◆ isDisjointFrom() [2/2]
isDisjointFrom
returns true if the intersection of this interval and x is empty.
Definition at line 119 of file Interval.h.
123 return _a >
x._b || _b <
x._a;
◆ isEmpty()
isEmpty
returns true if this interval does not contain any points.
Definition at line 83 of file Interval.h.
◆ isWithin() [1/2]
isWithin
returns true if the intersection of this interval and x is this interval.
Definition at line 140 of file Interval.h.
141 return (_a ==
x && _b ==
x) ||
isEmpty();
◆ isWithin() [2/2]
isWithin
returns true if the intersection of this interval and x is this interval.
Definition at line 144 of file Interval.h.
145 return x.contains(*
this);
◆ operator!=() [1/2]
Definition at line 72 of file Interval.h.
72 {
return !(*
this ==
x); }
◆ operator!=() [2/2]
Definition at line 65 of file Interval.h.
65 {
return !(*
this == i); }
◆ operator==() [1/2]
A closed interval is equal to a point x if both endpoints equal x.
Definition at line 68 of file Interval.h.
69 return (_a ==
x && _b ==
x) || (
x !=
x &&
isEmpty());
◆ operator==() [2/2]
Two closed intervals are equal if their endpoints are the same, or both are empty.
Definition at line 61 of file Interval.h.
62 return (_a == i._a && _b == i._b) || (i.isEmpty() &&
isEmpty());
◆ relate() [1/2]
relate
returns a bitset S describing the spatial relationships between this interval and x. For each relation that holds, the bitwise AND of S and the corresponding Relationship will be non-zero.
Definition at line 153 of file Interval.h.
252 return CONTAINS | DISJOINT | WITHIN;
254 return DISJOINT | WITHIN;
257 return CONTAINS | DISJOINT;
259 if (_a ==
x && _b ==
x) {
260 return CONTAINS | WITHIN;
◆ relate() [2/2]
relate
returns a bitset S describing the spatial relationships between this interval and x. For each relation that holds, the bitwise AND of S and the corresponding Relationship will be non-zero.
Definition at line 154 of file Interval.h.
274 return CONTAINS | DISJOINT | WITHIN;
276 return DISJOINT | WITHIN;
279 return CONTAINS | DISJOINT;
281 if (_a ==
x._a && _b ==
x._b) {
282 return CONTAINS | WITHIN;
284 if (_a >
x._b || _b <
x._a) {
287 if (_a <= x._a && _b >=
x._b) {
290 if (
x._a <= _a &&
x._b >= _b) {
The documentation for this class was generated from the following file:
- /j/snowflake/release/lsstsw/stack/1a1d771/Linux64/sphgeom/20.0.0/include/lsst/sphgeom/AngleInterval.h