LSSTApplications
21.0.0+1b62c9342b,21.0.0+45a059f35e,21.0.0-1-ga51b5d4+ceb9cf20a3,21.0.0-10-g68cce58c5+c7d3cce47e,21.0.0-2-g103fe59+c1ca725317,21.0.0-2-g1367e85+a1c2f7fe71,21.0.0-2-g2909d54+45a059f35e,21.0.0-2-g45278ab+1b62c9342b,21.0.0-2-g4bc9b9f+b2e40a4e47,21.0.0-2-g5242d73+a1c2f7fe71,21.0.0-2-g54e2caa+c00cf99ed0,21.0.0-2-g66bcc37+27b9d7859a,21.0.0-2-g7f82c8f+203cf74700,21.0.0-2-g8dde007+b0df52bfdd,21.0.0-2-g8f08a60+73884b2cf5,21.0.0-2-ga326454+203cf74700,21.0.0-2-ga63a54e+eec04437aa,21.0.0-2-gc738bc1+59028256f4,21.0.0-2-gde069b7+5a8f2956b8,21.0.0-2-ge17e5af+a1c2f7fe71,21.0.0-2-ge712728+9ad031c87e,21.0.0-2-gecfae73+d3766aec80,21.0.0-2-gfc62afb+a1c2f7fe71,21.0.0-20-g4449a12+38dfb87bce,21.0.0-22-gf0532904+afb8e7912b,21.0.0-3-g4c5b185+a403cb96fd,21.0.0-3-g6d51c4a+27b9d7859a,21.0.0-3-g8076721+e873df194c,21.0.0-3-gaa929c8+df5d87f43a,21.0.0-3-gd222c45+afc8332dbe,21.0.0-4-g1383c07+27b9d7859a,21.0.0-4-g3300ddd+1b62c9342b,21.0.0-4-g5873dc9+9a92674037,21.0.0-4-g8a80011+f67daf2f53,21.0.0-5-gcff38f6+bce43c5818,21.0.0-6-g463d161+44134145d4,21.0.0-6-gd3283ba+df5d87f43a,21.0.0-8-g19111d86+d6551531e4,w.2021.04
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
44 if (r <=
Angle(0.0)) {
111 _enforceInvariants();
197 if (
w.asRadians() <=
PI) {
261 double phi1, phi2, phi3;
262 double c =
cos(0.5 *
w);
274 if (phi1 <= phi3 && phi3 <= phi2) {
279 if (p1.
dot(boxVerts[0]) > p2.
dot(boxVerts[1])) {
288 double cl2 = (p - boxVerts[0]).getSquaredNorm();
289 for (
int i = 1; i < 4; ++i) {
290 cl2 =
std::max(cl2, (p - boxVerts[i]).getSquaredNorm());
311 if (!_lon.
isFull() && 0.5 *
w < r) {
321 return CONTAINS | DISJOINT | WITHIN;
323 return DISJOINT | WITHIN;
325 return CONTAINS | DISJOINT;
329 return CONTAINS | WITHIN;
348 for (
int i = 0; i < 4; ++i) {
350 double d = (verts[i] - c.
getCenter()).getSquaredNorm();
359 }
else if (inside !=
b) {
371 for (
int i = 0; i < 2; ++i) {
373 c.
getCenter(), verts[2 * i + 1], verts[2 * i], norms[i]);
409 for (
int i = 0; i < 2; ++i) {
411 c.
getCenter(), verts[2 * i + 1], verts[2 * i], norms[i]);
460 if (buffer ==
nullptr || n != ENCODED_SIZE || *buffer !=
TYPE_CODE) {
471 box->_enforceInvariants();
476 return os <<
"{\"Box\": [" <<
b.getLon() <<
", " <<
b.getLat() <<
"]}";
Scalar getCenter() const
getCenter returns the center of this interval.
double asRadians() const
asRadians returns the value of this angle in units of radians.
NormalizedAngle getCenter() const
getCenter returns the center of this interval.
static NormalizedAngleInterval fromRadians(double a, double b)
This file declares a class for representing longitude/latitude angle boxes on the unit sphere.
bool isFull() const
isFull returns true if this interval contains all normalized angles.
This file declares a class for representing axis-aligned bounding boxes in ℝ³.
double sin(Angle const &a)
static double squaredChordLengthFor(Angle openingAngle)
squaredChordLengthFor computes and returns the squared chord length between points in S² that are sep...
double asRadians() const
asRadians returns the value of this angle in units of radians.
bool isNan() const
isNan returns true if the angle value is NaN.
This file declares miscellaneous utility functions.
LonLat represents a spherical coordinate (longitude/latitude angle) pair.
Angle abs(Angle const &a)
bool isFull() const
isFull returns true if this box contains all points on the unit sphere.
Box represents a rectangle in spherical coordinate space that contains its boundary.
double dot(Vector3d const &v) const
dot returns the inner product of this unit vector and v.
Relationship relate(LonLat const &p) const
bool isEmpty() const
isEmpty returns true if this box does not contain any points.
This file contains simple helper functions for encoding and decoding primitive types to/from byte str...
Interval1d represents closed intervals of ℝ.
This file declares a class for representing circular regions on the unit sphere.
Box3d represents a box in ℝ³.
NormalizedAngle getWidth() const
getWidth returns the width in longitude angle of this box.
NormalizedAngleInterval & dilateBy(Angle x)
This file declares a class for representing elliptical regions on the unit sphere.
UnitVector3d is a unit vector in ℝ³ with components stored in double precision.
ConvexPolygon is a closed convex polygon on the unit sphere.
Scalar getA() const
getA returns the lower endpoint of this interval.
Circle getBoundingCircle() const override
getBoundingCircle returns a bounding-circle for this region.
double getArea() const
getArea returns the area of this box in steradians.
static NormalizedAngle halfWidthForCircle(Angle r, Angle lat)
halfWidthForCircle computes the half-width of bounding boxes for circles with radius r and centers at...
Ellipse is an elliptical region on the sphere.
double tan(Angle const &a)
double getSquaredChordLength() const
getSquaredChordLength returns the squared length of chords between the circle center and points on th...
Scalar getB() const
getB returns the upper endpoint of this interval.
bool contains(Scalar x) const
constexpr double MAX_SQUARED_CHORD_LENGTH_ERROR
Angle getMinAngleToCircle(Angle x, Angle c)
getMinAngleToCircle returns the minimum angular separation between a point at latitude x and the poin...
Box & dilateBy(Angle r)
dilateBy minimally expands this Box to include all points within angular separation r of its boundary...
double getMaxSquaredChordLength(Vector3d const &v, Vector3d const &a, Vector3d const &b, Vector3d const &n)
Let p be the unit vector furthest from v that lies on the plane with normal n in the direction of the...
AngleInterval represents closed intervals of arbitrary angles.
A base class for image defects.
bool contains(LonLat const &x) const
Relationship relate(Region const &r) const override
double decodeDouble(uint8_t const *buffer)
decode extracts an IEEE double from the 8 byte little-endian byte sequence in buffer.
static Box3d aroundUnitSphere()
aroundUnitSphere returns a minimal Box3d containing the unit sphere.
bool contains(NormalizedAngle x) const
NormalizedAngle getA() const
getA returns the first endpoint of this interval.
NormalizedAngle getSize() const
getSize returns the size (length, width) of this interval.
static constexpr uint8_t TYPE_CODE
std::vector< uint8_t > encode() const override
encode serializes this region into an opaque byte string.
Box3d getBoundingBox3d() const override
getBoundingBox3d returns a 3-dimensional bounding-box for this region.
Angle represents an angle in radians.
static UnitVector3d orthogonalTo(Vector3d const &v)
orthogonalTo returns an arbitrary unit vector that is orthogonal to v.
Relationship relate(Region const &r) const override
double getMinSquaredChordLength(Vector3d const &v, Vector3d const &a, Vector3d const &b, Vector3d const &n)
Let p be the unit vector closest to v that lies on the plane with normal n in the direction of the cr...
std::ostream & operator<<(std::ostream &, Angle const &)
UnitVector3d const & getCenter() const
getCenter returns the center of this circle as a unit vector.
Circle is a circular region on the unit sphere that contains its boundary.
NormalizedAngle is an angle that lies in the range [0, 2π), with one exception - a NormalizedAngle ca...
constexpr double MAX_ASIN_ERROR
double cos(Angle const &a)
static AngleInterval fromRadians(double x, double y)
NormalizedAngle getLon() const
static std::unique_ptr< Box > decode(std::vector< uint8_t > const &s)
Relationship invert(Relationship r)
Given the relationship between two sets A and B (i.e.
This file declares a class for representing convex polygons with great circle edges on the unit spher...
NormalizedAngle getB() const
getB returns the second endpoint of this interval.
void encodeDouble(double item, std::vector< uint8_t > &buffer)
encode appends an IEEE double in little-endian byte order to the end of buffer.