LSSTApplications
19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
23 #ifndef LSST_SPHGEOM_BOX3D_H_
24 #define LSST_SPHGEOM_BOX3D_H_
103 _enforceInvariants();
108 return _intervals[0] ==
b._intervals[0] &&
109 _intervals[1] ==
b._intervals[1] &&
110 _intervals[2] ==
b._intervals[2];
217 _enforceInvariants();
225 _enforceInvariants();
233 return Box3d(*this).clipTo(
b);
237 return Box3d(*this).clipTo(
b);
262 return Box3d(*this).expandTo(
b);
266 return Box3d(*this).expandTo(
b);
290 _enforceInvariants();
294 return Box3d(*this).dilateBy(
w, h, d);
314 return ((xr & yr & zr) & (CONTAINS | WITHIN)) |
315 ((xr | yr | zr) & DISJOINT);
320 void _enforceInvariants() {
330 Interval1d _intervals[3];
337 #endif // LSST_SPHGEOM_BOX3D_H_
bool contains(Vector3d const &b) const
Interval1d operator()(int i) const
The function call operator returns the i-th interval of this box.
Box3d & clipTo(Vector3d const &b)
Box3d & erodeBy(double r)
Box3d & dilateBy(double w, double h, double d)
dilateBy morphologically dilates or erodes the x, y, and z intervals of this box by w,...
bool intersects(Vector3d const &b) const
double getWidth() const
getWidth returns the width (x-axis extent) of this box.
bool operator==(Box3d const &b) const
Two 3D boxes are equal if they contain the same points.
Box3d clippedTo(Box3d const &b) const
bool isFull() const
isFull returns true if this box contains all points in ℝ³.
Relationship relate(Vector3d const &v) const
bool isEmpty() const
isEmpty returns true if this box does not contain any points.
Box3d & dilateBy(double r)
dilateBy minimally expands or shrinks this Box to include or remove all points within distance |r| of...
Box3d dilatedBy(double r) const
This file provides a type alias for describing set relationships.
Box3d(Interval1d const &x, Interval1d const &y, Interval1d const &z)
This constructor creates a box spanning the given x, y, and z intervals.
Box3d()
This constructor creates an empty 3D box.
This file defines a class for representing intervals of ℝ.
Box3d & erodeBy(double w, double h, double d)
Interval & clipTo(Scalar x)
Interval1d represents closed intervals of ℝ.
Scalar getSize() const
getSize returns the size (length, width) of this interval.
Vector3d is a vector in ℝ³ with components stored in double precision.
Interval1d const & x() const
Box3d represents a box in ℝ³.
Relationship relate(Box3d const &b) const
Box3d & expandTo(Box3d const &b)
bool isDisjointFrom(Box3d const &b) const
bool isWithin(Vector3d const &b) const
bool isEmpty() const
isEmpty returns true if this interval does not contain any points.
Box3d(Vector3d const &v)
This constructor creates a box containing a single point.
Relationship relate(Scalar x) const
bool isWithin(Box3d const &b) const
double getDepth() const
getDepth returns the depth (z-axis extent) of this box.
Vector3d getCenter() const
getCenter returns the center of this box.
This file declares a class for representing vectors in ℝ³.
bool contains(Scalar x) const
Box3d clippedTo(Vector3d const &b) const
bool isWithin(Scalar x) const
Interval1d const & z() const
double getHeight() const
getHeight returns the height (y-axis extent) of this box.
A base class for image defects.
Box3d & expandTo(Vector3d const &b)
bool intersects(Box3d const &b) const
Box3d expandedTo(Vector3d const &b) const
Box3d erodedBy(double w, double h, double d) const
Box3d(Vector3d const &v, double w, double h, double d)
This constructor creates a box with center v, half-width w, half-height h, and half-depth d.
bool isFull() const
isFull returns true if this interval = ℝ.
static Box3d aroundUnitSphere()
aroundUnitSphere returns a minimal Box3d containing the unit sphere.
bool operator!=(Box3d const &b) const
bool operator==(Vector3d const &v) const
A box is equal to a point if it contains only that point.
Interval & dilateBy(Scalar x)
For positive x, dilateBy morphologically dilates this interval by [-x,x], which is equivalent to the ...
std::ostream & operator<<(std::ostream &, Angle const &)
bool operator!=(Vector3d const &v) const
Interval & expandTo(Scalar x)
bool contains(Box3d const &b) const
Box3d dilatedBy(double w, double h, double d) const
bool intersects(Scalar x) const
Derived dilatedBy(Scalar x) const
Box3d erodedBy(double r) const
Box3d expandedTo(Box3d const &b) const
Box3d(Vector3d const &v1, Vector3d const &v2)
This constructor creates a box spanning the intervals [v1.x(), v2.x()], [v1.y(), v2....
Interval1d const & y() const
bool isDisjointFrom(Vector3d const &b) const
Box3d & clipTo(Box3d const &b)