LSSTApplications
20.0.0
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)