23 #ifndef LSST_SPHGEOM_ELLIPSE_H_ 24 #define LSST_SPHGEOM_ELLIPSE_H_ 183 _tana(
std::numeric_limits<double>::infinity()),
184 _tanb(
std::numeric_limits<double>::infinity())
213 return _S == e._S && _a == e._a && _b == e._b;
264 _S =
Matrix3d(-_S(0,0), -_S(0,1), -_S(0,2),
265 _S(1,0), _S(1,1), _S(1,2),
266 -_S(2,0), -_S(2,1), -_S(2,2));
307 static constexpr
size_t ENCODED_SIZE = 113;
321 #endif // LSST_SPHGEOM_ELLIPSE_H_ This file declares a class for representing circular regions on the unit sphere.
static std::unique_ptr< Ellipse > decode(std::vector< uint8_t > const &s)
bool isGreatCircle() const
Ellipse()
This constructor creates an empty ellipse.
UnitVector3d getCenter() const
getCenter returns the center of the ellipse as a unit vector.
bool operator==(Ellipse const &e) const
Ellipse(Circle const &c)
This constructor creates an ellipse corresponding to the given circle.
Ellipse complemented() const
complemented returns the closure of the complement of this ellipse.
UnitVector3d rotatedAround(UnitVector3d const &k, Angle a) const
rotatedAround returns a copy of this unit vector, rotated around the unit vector k by angle a accordi...
Angle getOpeningAngle() const
getOpeningAngle returns the opening angle of this circle - that is, the angle between its center vect...
std::unique_ptr< Region > clone() const override
clone returns a deep copy of this region.
std::ostream & operator<<(std::ostream &, Angle const &)
Relationship invert(Relationship r)
Given the relationship between two sets A and B (i.e.
Box represents a rectangle in spherical coordinate space that contains its boundary.
A 3x3 matrix with real entries stored in double precision.
std::vector< uint8_t > encode() const override
encode serializes this region into an opaque byte string.
Matrix3d const & getTransformMatrix() const
getTransformMatrix returns the orthogonal matrix that maps vectors to the basis in which the quadrati...
This file declares a class for representing unit vectors in ℝ³.
Ellipse is an elliptical region on the sphere.
A base class for image defects.
double asRadians() const
asRadians returns the value of this angle in units of radians.
This file defines an interface for spherical regions.
Region is a minimal interface for 2-dimensional regions on the unit sphere.
virtual Relationship relate(Region const &) const =0
Box3d getBoundingBox3d() const override
getBoundingBox3d returns a 3-dimensional bounding-box for this region.
Box getBoundingBox() const override
getBoundingBox returns a bounding-box for this region.
Angle getBeta() const
getBeta returns β, the second semi-axis length of the ellipse.
Circle is a circular region on the unit sphere that contains its boundary.
ConvexPolygon is a closed convex polygon on the unit sphere.
Angle getAlpha() const
getAlpha returns α, the first semi-axis length of the ellipse.
Relationship relate(Region const &r) const override
Circle getBoundingCircle() const override
getBoundingCircle returns a bounding-circle for this region.
Angle represents an angle in radians.
bool operator!=(Ellipse const &e) const
UnitVector3d const & getCenter() const
getCenter returns the center of this circle as a unit vector.
Box3d represents a box in ℝ³.
Ellipse & complement()
complement sets this ellipse to the closure of its complement.
Ellipse(UnitVector3d const &v, Angle alpha=Angle(0.0))
This constructor creates an ellipse corresponding to the circle with the given center and opening ang...
Angle getGamma() const
getGamma returns ɣ ∈ [0, π/2], half of the angle between the foci.
UnitVector3d getF2() const
getF2 returns the second focal point of the ellipse.
UnitVector3d is a unit vector in ℝ³ with components stored in double precision.
static constexpr uint8_t TYPE_CODE
static UnitVector3d fromNormalized(Vector3d const &v)
fromNormalized returns the unit vector equal to v, which is assumed to be normalized.
This file contains a class representing 3x3 real matrices.
UnitVector3d getF1() const
getF1 returns the first focal point of the ellipse.
bool contains(UnitVector3d const &v) const override
contains tests whether the given unit vector is inside this region.