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_CIRCLE_H_
24 #define LSST_SPHGEOM_CIRCLE_H_
67 _squaredChordLength(-1.0),
78 _squaredChordLength(0.0),
96 _squaredChordLength(cl2),
103 (_center == c._center &&
104 _squaredChordLength == c._squaredChordLength &&
105 _openingAngle == c._openingAngle);
111 return !(_squaredChordLength >= 0.0);
114 bool isFull()
const {
return _squaredChordLength >= 4.0; }
166 return Circle(*this).clipTo(
x);
170 return Circle(*this).clipTo(
x);
184 return Circle(*this).expandTo(
x);
188 return Circle(*this).expandTo(
x);
232 (v - _center).getSquaredNorm() <= _squaredChordLength;
256 static constexpr
size_t ENCODED_SIZE = 41;
259 double _squaredChordLength;
267 #endif // LSST_SPHGEOM_CIRCLE_H_
Circle(UnitVector3d const &c, double cl2)
This constructor creates a circle with center c and squared chord length cl2.
Circle()
This constructor creates an empty circle.
This file defines an interface for spherical regions.
bool intersects(UnitVector3d const &x) const
Circle & dilateBy(Angle r)
If r is positive, dilateBy increases the opening angle of this circle to include all points within an...
Circle getBoundingCircle() const override
getBoundingCircle returns a bounding-circle for this region.
virtual Relationship relate(Region const &) const =0
std::unique_ptr< Region > clone() const override
clone returns a deep copy of this region.
Circle & complement()
complement sets this circle to the closure of its complement.
Region is a minimal interface for 2-dimensional regions on the unit sphere.
static double squaredChordLengthFor(Angle openingAngle)
squaredChordLengthFor computes and returns the squared chord length between points in S² that are sep...
This file declares a class for representing unit vectors in ℝ³.
static constexpr uint8_t TYPE_CODE
double getArea() const
getArea returns the area of this circle in steradians.
Relationship relate(UnitVector3d const &v) const
Box represents a rectangle in spherical coordinate space that contains its boundary.
bool isWithin(UnitVector3d const &) const
bool intersects(Circle const &x) const
Circle & clipTo(UnitVector3d const &x)
bool isDisjointFrom(UnitVector3d const &x) const
Circle erodedBy(Angle r) const
Circle complemented() const
complemented returns the closure of the complement of this circle.
bool operator==(Circle const &c) const
Circle(UnitVector3d const &c)
This constructor creates the circle with center c and squared chord length / opening angle of zero.
Box3d represents a box in ℝ³.
Circle & erodeBy(Angle r)
Relationship relate(Region const &r) const override
bool operator!=(Circle const &c) const
UnitVector3d is a unit vector in ℝ³ with components stored in double precision.
bool isWithin(Circle const &x) const
Circle & expandTo(UnitVector3d const &x)
Angle getOpeningAngle() const
getOpeningAngle returns the opening angle of this circle - that is, the angle between its center vect...
ConvexPolygon is a closed convex polygon on the unit sphere.
Circle expandedTo(UnitVector3d const &x) const
Box getBoundingBox() const override
getBoundingBox returns a bounding-box for this region.
Ellipse is an elliptical region on the sphere.
double getSquaredChordLength() const
getSquaredChordLength returns the squared length of chords between the circle center and points on th...
Box3d getBoundingBox3d() const override
getBoundingBox3d returns a 3-dimensional bounding-box for this region.
A base class for image defects.
Circle(UnitVector3d const &c, Angle a)
This constructor creates a circle with center c and opening angle a.
Circle clippedTo(UnitVector3d const &x) const
std::vector< uint8_t > encode() const override
encode serializes this region into an opaque byte string.
Circle expandedTo(Circle const &x) const
bool contains(Circle const &x) const
contains returns true if the intersection of this circle and x is equal to x.
static std::unique_ptr< Circle > decode(std::vector< uint8_t > const &s)
bool contains(UnitVector3d const &v) const override
contains tests whether the given unit vector is inside this region.
Angle represents an angle in radians.
std::ostream & operator<<(std::ostream &, Angle const &)
Circle clippedTo(Circle const &x) 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.
Circle dilatedBy(Angle r) const
static Angle openingAngleFor(double squaredChordLength)
openingAngleFor computes and returns the angular separation between points in S² that are separated b...
Relationship invert(Relationship r)
Given the relationship between two sets A and B (i.e.