LSST Applications g070148d5b3+33e5256705,g0d53e28543+25c8b88941,g0da5cf3356+2dd1178308,g1081da9e2a+62d12e78cb,g17e5ecfddb+7e422d6136,g1c76d35bf8+ede3a706f7,g295839609d+225697d880,g2e2c1a68ba+cc1f6f037e,g2ffcdf413f+853cd4dcde,g38293774b4+62d12e78cb,g3b44f30a73+d953f1ac34,g48ccf36440+885b902d19,g4b2f1765b6+7dedbde6d2,g5320a0a9f6+0c5d6105b6,g56b687f8c9+ede3a706f7,g5c4744a4d9+ef6ac23297,g5ffd174ac0+0c5d6105b6,g6075d09f38+66af417445,g667d525e37+2ced63db88,g670421136f+2ced63db88,g71f27ac40c+2ced63db88,g774830318a+463cbe8d1f,g7876bc68e5+1d137996f1,g7985c39107+62d12e78cb,g7fdac2220c+0fd8241c05,g96f01af41f+368e6903a7,g9ca82378b8+2ced63db88,g9d27549199+ef6ac23297,gabe93b2c52+e3573e3735,gb065e2a02a+3dfbe639da,gbc3249ced9+0c5d6105b6,gbec6a3398f+0c5d6105b6,gc9534b9d65+35b9f25267,gd01420fc67+0c5d6105b6,geee7ff78d7+a14128c129,gf63283c776+ede3a706f7,gfed783d017+0c5d6105b6,w.2022.47
LSST Data Management Base Package
|
Namespaces | |
namespace | _healpixPixelization |
namespace | _yaml |
namespace | detail |
namespace | pixelization_abc |
namespace | python |
namespace | version |
Classes | |
class | Angle |
Angle represents an angle in radians. More... | |
class | AngleInterval |
AngleInterval represents closed intervals of arbitrary angles. More... | |
class | BigInteger |
BigInteger is an arbitrary precision signed integer class. More... | |
class | Box |
Box represents a rectangle in spherical coordinate space that contains its boundary. More... | |
class | Box3d |
Box3d represents a box in ℝ³. More... | |
class | Chunker |
Chunker subdivides the unit sphere into longitude-latitude boxes. More... | |
class | Circle |
Circle is a circular region on the unit sphere that contains its boundary. More... | |
class | CompoundRegion |
CompoundRegion is an intermediate base class for spherical regions that are comprised of a point-set operation on other nested regions. More... | |
class | ConvexPolygon |
ConvexPolygon is a closed convex polygon on the unit sphere. More... | |
class | Ellipse |
Ellipse is an elliptical region on the sphere. More... | |
class | HtmPixelization |
HtmPixelization provides HTM indexing of points and regions. More... | |
class | IntersectionRegion |
IntersectionRegion is a lazy point-set inersection of its operands. More... | |
class | Interval |
Interval represents a closed interval of the real numbers by its upper and lower bounds. More... | |
class | Interval1d |
Interval1d represents closed intervals of ℝ. More... | |
class | LonLat |
LonLat represents a spherical coordinate (longitude/latitude angle) pair. More... | |
class | Matrix3d |
A 3x3 matrix with real entries stored in double precision. More... | |
class | Mq3cPixelization |
Mq3cPixelization provides modified Q3C indexing of points and regions. More... | |
class | NormalizedAngle |
NormalizedAngle is an angle that lies in the range [0, 2π), with one exception - a NormalizedAngle can be NaN. More... | |
class | NormalizedAngleInterval |
NormalizedAngleInterval represents closed intervals of normalized angles, i.e. More... | |
class | Pixelization |
A Pixelization (or partitioning) of the sphere is a mapping between points on the sphere and a set of pixels (a.k.a. More... | |
class | Q3cPixelization |
Q3cPixelization provides Q3C indexing of points and regions. More... | |
class | RangeSet |
A RangeSet is a set of unsigned 64 bit integers. More... | |
class | Region |
Region is a minimal interface for 2-dimensional regions on the unit sphere. More... | |
struct | SubChunks |
SubChunks represents a set of sub-chunks of a particular chunk. More... | |
class | UnionRegion |
UnionRegion is a lazy point-set union of its operands. More... | |
class | UnitVector3d |
UnitVector3d is a unit vector in ℝ³ with components stored in double precision. More... | |
class | Vector3d |
Vector3d is a vector in ℝ³ with components stored in double precision. More... | |
Typedefs | |
using | Relationship = std::bitset< 3 > |
Relationship describes how two sets are related. More... | |
Functions | |
Angle | operator* (double a, Angle const &b) |
std::ostream & | operator<< (std::ostream &, Angle const &) |
double | sin (Angle const &a) |
double | cos (Angle const &a) |
double | tan (Angle const &a) |
Angle | abs (Angle const &a) |
std::ostream & | operator<< (std::ostream &, AngleInterval const &) |
std::ostream & | operator<< (std::ostream &, Box const &) |
std::ostream & | operator<< (std::ostream &, Box3d const &) |
std::ostream & | operator<< (std::ostream &, Circle const &) |
void | encodeDouble (double item, std::vector< uint8_t > &buffer) |
encodeDouble appends an IEEE double in little-endian byte order to the end of buffer. More... | |
double | decodeDouble (uint8_t const *buffer) |
decodeDouble extracts an IEEE double from the 8 byte little-endian byte sequence in buffer. More... | |
void | encodeU64 (std::uint64_t item, std::vector< uint8_t > &buffer) |
encodeU64 appends an uint64 in little-endian byte order to the end of buffer. More... | |
std::uint64_t | decodeU64 (uint8_t const *buffer) |
decodeU64 extracts an uint64 from the 8 byte little-endian byte sequence in buffer. More... | |
std::ostream & | operator<< (std::ostream &, ConvexPolygon const &) |
uint64_t | mortonIndex (uint32_t x, uint32_t y) |
mortonIndex interleaves the bits of x and y. More... | |
std::tuple< uint32_t, uint32_t > | mortonIndexInverse (uint64_t z) |
mortonIndexInverse separates the even and odd bits of z. More... | |
uint64_t | mortonToHilbert (uint64_t z, int m) |
mortonToHilbert converts the 2m-bit Morton index z to the corresponding Hilbert index. More... | |
uint64_t | hilbertToMorton (uint64_t h, int m) |
hilbertToMorton converts the 2m-bit Hilbert index h to the corresponding Morton index. More... | |
uint64_t | hilbertIndex (uint32_t x, uint32_t y, int m) |
hilbertIndex returns the index of (x, y) in a 2-D Hilbert curve. More... | |
std::tuple< uint32_t, uint32_t > | hilbertIndexInverse (uint64_t h, int m) |
hilbertIndexInverse returns the point (x, y) with Hilbert index h, where x and y are m bit integers. More... | |
std::ostream & | operator<< (std::ostream &, Ellipse const &) |
std::ostream & | operator<< (std::ostream &, Interval1d const &) |
std::ostream & | operator<< (std::ostream &, LonLat const &) |
std::ostream & | operator<< (std::ostream &, Matrix3d const &) |
NormalizedAngle const & | abs (NormalizedAngle const &a) |
std::ostream & | operator<< (std::ostream &, NormalizedAngleInterval const &) |
int | orientationExact (Vector3d const &a, Vector3d const &b, Vector3d const &c) |
orientationExact computes and returns the orientations of 3 vectors a, b and c, which need not be normalized but are assumed to have finite components. More... | |
int | orientation (UnitVector3d const &a, UnitVector3d const &b, UnitVector3d const &c) |
orientation computes and returns the orientations of 3 unit vectors a, b and c. More... | |
int | orientationX (UnitVector3d const &b, UnitVector3d const &c) |
orientationX(b, c) is equivalent to orientation(UnitVector3d::X(), b, c) . More... | |
int | orientationY (UnitVector3d const &b, UnitVector3d const &c) |
orientationY(b, c) is equivalent to orientation(UnitVector3d::Y(), b, c) . More... | |
int | orientationZ (UnitVector3d const &b, UnitVector3d const &c) |
orientationZ(b, c) is equivalent to orientation(UnitVector3d::Z(), b, c) . More... | |
template<typename Pybind11Class > | |
void | defineClass (Pybind11Class &cls) |
void | swap (RangeSet &a, RangeSet &b) |
std::ostream & | operator<< (std::ostream &, RangeSet const &) |
Relationship | invert (Relationship r) |
Given the relationship between two sets A and B (i.e. More... | |
std::ostream & | operator<< (std::ostream &, UnitVector3d const &) |
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 cross product of a and b. More... | |
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 cross product of a and b. More... | |
Angle | getMinAngleToCircle (Angle x, Angle c) |
getMinAngleToCircle returns the minimum angular separation between a point at latitude x and the points on the circle of constant latitude c. More... | |
Angle | getMaxAngleToCircle (Angle x, Angle c) |
getMaxAngleToCircle returns the maximum angular separation between a point at latitude x and the points on the circle of constant latitude c. More... | |
Vector3d | getWeightedCentroid (UnitVector3d const &v0, UnitVector3d const &v1, UnitVector3d const &v2) |
getWeightedCentroid returns the center of mass of the given spherical triangle (assuming a uniform mass distribution over the triangle surface), weighted by the triangle area. More... | |
Vector3d | operator* (double s, Vector3d const &v) |
std::ostream & | operator<< (std::ostream &, Vector3d const &) |
template<> | |
void | defineClass (py::class_< Angle > &cls) |
template<> | |
void | defineClass (py::class_< AngleInterval, std::shared_ptr< AngleInterval > > &cls) |
template<> | |
void | defineClass (py::class_< Box, std::unique_ptr< Box >, Region > &cls) |
template<> | |
void | defineClass (py::class_< Box3d, std::shared_ptr< Box3d > > &cls) |
template<> | |
void | defineClass (py::class_< Chunker, std::shared_ptr< Chunker > > &cls) |
template<> | |
void | defineClass (py::class_< Circle, std::unique_ptr< Circle >, Region > &cls) |
template<> | |
void | defineClass (py::class_< CompoundRegion, std::unique_ptr< CompoundRegion >, Region > &cls) |
template<> | |
void | defineClass (py::class_< UnionRegion, std::unique_ptr< UnionRegion >, CompoundRegion > &cls) |
template<> | |
void | defineClass (py::class_< IntersectionRegion, std::unique_ptr< IntersectionRegion >, CompoundRegion > &cls) |
template<> | |
void | defineClass (py::class_< ConvexPolygon, std::unique_ptr< ConvexPolygon >, Region > &cls) |
void | defineCurve (py::module &mod) |
template<> | |
void | defineClass (py::class_< Ellipse, std::unique_ptr< Ellipse >, Region > &cls) |
template<> | |
void | defineClass (py::class_< HtmPixelization, Pixelization > &cls) |
template<> | |
void | defineClass (py::class_< Interval1d, std::shared_ptr< Interval1d > > &cls) |
template<> | |
void | defineClass (py::class_< LonLat, std::shared_ptr< LonLat > > &cls) |
template<> | |
void | defineClass (py::class_< Matrix3d, std::shared_ptr< Matrix3d > > &cls) |
template<> | |
void | defineClass (py::class_< Mq3cPixelization, Pixelization > &cls) |
template<> | |
void | defineClass (py::class_< NormalizedAngle > &cls) |
template<> | |
void | defineClass (py::class_< NormalizedAngleInterval, std::shared_ptr< NormalizedAngleInterval > > &cls) |
void | defineOrientation (py::module &mod) |
template<> | |
void | defineClass (py::class_< Pixelization > &cls) |
template<> | |
void | defineClass (py::class_< Q3cPixelization, Pixelization > &cls) |
template<> | |
void | defineClass (py::class_< RangeSet, std::shared_ptr< RangeSet > > &cls) |
template<> | |
void | defineClass (py::class_< Region, std::unique_ptr< Region > > &cls) |
void | defineRelationship (py::module &mod) |
void | defineUtils (py::module &) |
template<> | |
void | defineClass (py::class_< UnitVector3d, std::shared_ptr< UnitVector3d > > &cls) |
template<> | |
void | defineClass (py::class_< Vector3d, std::shared_ptr< Vector3d > > &cls) |
uint8_t | log2 (uint64_t x) |
uint8_t | log2 (uint32_t x) |
Variables | |
constexpr double | PI = 3.1415926535897932384626433832795 |
constexpr double | ONE_OVER_PI = 0.318309886183790671537767526745 |
constexpr double | RAD_PER_DEG = 0.0174532925199432957692369076849 |
constexpr double | DEG_PER_RAD = 57.2957795130823208767981548141 |
constexpr double | MAX_ASIN_ERROR = 1.5e-8 |
constexpr double | MAX_SQUARED_CHORD_LENGTH_ERROR = 2.5e-15 |
constexpr double | EPSILON = 1.1102230246251565e-16 |
using lsst::sphgeom::Relationship = typedef std::bitset<3> |
Relationship
describes how two sets are related.
Definition at line 35 of file Relationship.h.
|
inline |
Definition at line 152 of file NormalizedAngle.h.
|
inline |
|
inline |
decodeDouble
extracts an IEEE double from the 8 byte little-endian byte sequence in buffer.
Definition at line 69 of file codec.h.
|
inline |
decodeU64
extracts an uint64 from the 8 byte little-endian byte sequence in buffer.
Definition at line 108 of file codec.h.
void lsst::sphgeom::defineClass | ( | py::class_< Angle > & | cls | ) |
Definition at line 36 of file _angle.cc.
void lsst::sphgeom::defineClass | ( | py::class_< AngleInterval, std::shared_ptr< AngleInterval > > & | cls | ) |
Definition at line 36 of file _angleInterval.cc.
void lsst::sphgeom::defineClass | ( | py::class_< Box, std::unique_ptr< Box >, Region > & | cls | ) |
Definition at line 48 of file _box.cc.
void lsst::sphgeom::defineClass | ( | py::class_< Box3d, std::shared_ptr< Box3d > > & | cls | ) |
Definition at line 38 of file _box3d.cc.
void lsst::sphgeom::defineClass | ( | py::class_< Chunker, std::shared_ptr< Chunker > > & | cls | ) |
Definition at line 43 of file _chunker.cc.
void lsst::sphgeom::defineClass | ( | py::class_< Circle, std::unique_ptr< Circle >, Region > & | cls | ) |
Definition at line 44 of file _circle.cc.
void lsst::sphgeom::defineClass | ( | py::class_< CompoundRegion, std::unique_ptr< CompoundRegion >, Region > & | cls | ) |
Definition at line 46 of file _compoundRegion.cc.
void lsst::sphgeom::defineClass | ( | py::class_< ConvexPolygon, std::unique_ptr< ConvexPolygon >, Region > & | cls | ) |
Definition at line 45 of file _convexPolygon.cc.
void lsst::sphgeom::defineClass | ( | py::class_< Ellipse, std::unique_ptr< Ellipse >, Region > & | cls | ) |
Definition at line 44 of file _ellipse.cc.
void lsst::sphgeom::defineClass | ( | py::class_< HtmPixelization, Pixelization > & | cls | ) |
Definition at line 35 of file _htmPixelization.cc.
void lsst::sphgeom::defineClass | ( | py::class_< IntersectionRegion, std::unique_ptr< IntersectionRegion >, CompoundRegion > & | cls | ) |
Definition at line 64 of file _compoundRegion.cc.
void lsst::sphgeom::defineClass | ( | py::class_< Interval1d, std::shared_ptr< Interval1d > > & | cls | ) |
Definition at line 36 of file _interval1d.cc.
void lsst::sphgeom::defineClass | ( | py::class_< LonLat, std::shared_ptr< LonLat > > & | cls | ) |
Definition at line 36 of file _lonLat.cc.
void lsst::sphgeom::defineClass | ( | py::class_< Matrix3d, std::shared_ptr< Matrix3d > > & | cls | ) |
Definition at line 42 of file _matrix3d.cc.
void lsst::sphgeom::defineClass | ( | py::class_< Mq3cPixelization, Pixelization > & | cls | ) |
Definition at line 35 of file _mq3cPixelization.cc.
void lsst::sphgeom::defineClass | ( | py::class_< NormalizedAngle > & | cls | ) |
Definition at line 37 of file _normalizedAngle.cc.
void lsst::sphgeom::defineClass | ( | py::class_< NormalizedAngleInterval, std::shared_ptr< NormalizedAngleInterval > > & | cls | ) |
Definition at line 36 of file _normalizedAngleInterval.cc.
void lsst::sphgeom::defineClass | ( | py::class_< Pixelization > & | cls | ) |
Definition at line 37 of file _pixelization.cc.
void lsst::sphgeom::defineClass | ( | py::class_< Q3cPixelization, Pixelization > & | cls | ) |
Definition at line 35 of file _q3cPixelization.cc.
void lsst::sphgeom::defineClass | ( | py::class_< RangeSet, std::shared_ptr< RangeSet > > & | cls | ) |
Definition at line 87 of file _rangeSet.cc.
void lsst::sphgeom::defineClass | ( | py::class_< Region, std::unique_ptr< Region > > & | cls | ) |
Definition at line 45 of file _region.cc.
void lsst::sphgeom::defineClass | ( | py::class_< UnionRegion, std::unique_ptr< UnionRegion >, CompoundRegion > & | cls | ) |
Definition at line 56 of file _compoundRegion.cc.
void lsst::sphgeom::defineClass | ( | py::class_< UnitVector3d, std::shared_ptr< UnitVector3d > > & | cls | ) |
Definition at line 39 of file _unitVector3d.cc.
void lsst::sphgeom::defineClass | ( | py::class_< Vector3d, std::shared_ptr< Vector3d > > & | cls | ) |
Definition at line 38 of file _vector3d.cc.
void lsst::sphgeom::defineClass | ( | Pybind11Class & | cls | ) |
void lsst::sphgeom::defineCurve | ( | py::module & | mod | ) |
Definition at line 32 of file _curve.cc.
void lsst::sphgeom::defineOrientation | ( | py::module & | mod | ) |
Definition at line 32 of file _orientation.cc.
void lsst::sphgeom::defineRelationship | ( | py::module & | mod | ) |
Definition at line 32 of file _relationship.cc.
void lsst::sphgeom::defineUtils | ( | py::module & | mod | ) |
Definition at line 37 of file _utils.cc.
|
inline |
|
inline |
getMaxAngleToCircle
returns the maximum angular separation between a point at latitude x and the points on the circle of constant latitude c.
Definition at line 68 of file utils.h.
double lsst::sphgeom::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 cross product of a and b.
If p is in the interior of the great circle segment from a to b, then this helper function returns the squared chord length between p and v. Otherwise it returns 0 - the minimum squared chord length between any pair of points on the sphere.
Definition at line 58 of file utils.cc.
double lsst::sphgeom::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 cross product of a and b.
If p is in the interior of the great circle segment from a to b, then this function returns the squared chord length between p and v. Otherwise it returns 4 - the maximum squared chord length between any pair of points on the unit sphere.
Definition at line 36 of file utils.cc.
Vector3d lsst::sphgeom::getWeightedCentroid | ( | UnitVector3d const & | v0, |
UnitVector3d const & | v1, | ||
UnitVector3d const & | v2 | ||
) |
getWeightedCentroid
returns the center of mass of the given spherical triangle (assuming a uniform mass distribution over the triangle surface), weighted by the triangle area.
Definition at line 79 of file utils.cc.
|
inline |
hilbertIndex
returns the index of (x, y) in a 2-D Hilbert curve.
Only the m least significant bits of x and y are used. Computing the Hilbert index of a point has been measured to take 4 to 15 times as long as computing its Morton index on an Intel Core i7-3820QM CPU. With Xcode 7.3 and -O3, latency is ~19ns per call at a CPU frequency of 3.5 GHz.
Definition at line 349 of file curve.h.
|
inline |
hilbertIndexInverse
returns the point (x, y) with Hilbert index h, where x and y are m bit integers.
Definition at line 361 of file curve.h.
|
inline |
hilbertToMorton
converts the 2m-bit Hilbert index h to the corresponding Morton index.
Definition at line 290 of file curve.h.
|
inline |
Given the relationship between two sets A and B (i.e.
the output of A.relate(B)
), invert
returns the relationship between B and A (B.relate(A)
).
Definition at line 55 of file Relationship.h.
|
inline |
log2
returns the index of the most significant 1 bit in x. If x is 0, the return value is 0.
A beautiful algorithm to find this index is presented in:
Using de Bruijn Sequences to Index a 1 in a Computer Word C. E. Leiserson, H. Prokop, and K. H. Randall. http://supertech.csail.mit.edu/papers/debruijn.pdf
Definition at line 125 of file curve.h.
|
inline |
log2
returns the index of the most significant 1 bit in x. If x is 0, the return value is 0.
A beautiful algorithm to find this index is presented in:
Using de Bruijn Sequences to Index a 1 in a Computer Word C. E. Leiserson, H. Prokop, and K. H. Randall. http://supertech.csail.mit.edu/papers/debruijn.pdf
Definition at line 98 of file curve.h.
|
inline |
mortonIndex
interleaves the bits of x and y.
The 32 even bits of the return value will be the bits of x, and the 32 odd bits those of y. This is the z-value of (x,y) defined by the Morton order function. See https://en.wikipedia.org/wiki/Z-order_curve for more information.
Definition at line 148 of file curve.h.
|
inline |
mortonIndexInverse
separates the even and odd bits of z.
The 32 even bits of z are returned in the first element of the result tuple, and the 32 odd bits in the second. This is the inverse of mortonIndex().
Definition at line 195 of file curve.h.
|
inline |
mortonToHilbert
converts the 2m-bit Morton index z to the corresponding Hilbert index.
Definition at line 236 of file curve.h.
Definition at line 165 of file Vector3d.h.
std::ostream & lsst::sphgeom::operator<< | ( | std::ostream & | os, |
Angle const & | a | ||
) |
std::ostream & lsst::sphgeom::operator<< | ( | std::ostream & | os, |
AngleInterval const & | i | ||
) |
Definition at line 34 of file AngleInterval.cc.
std::ostream & lsst::sphgeom::operator<< | ( | std::ostream & | os, |
Box const & | b | ||
) |
std::ostream & lsst::sphgeom::operator<< | ( | std::ostream & | os, |
Box3d const & | b | ||
) |
std::ostream & lsst::sphgeom::operator<< | ( | std::ostream & | os, |
Circle const & | c | ||
) |
std::ostream & lsst::sphgeom::operator<< | ( | std::ostream & | os, |
ConvexPolygon const & | p | ||
) |
Definition at line 382 of file ConvexPolygon.cc.
std::ostream & lsst::sphgeom::operator<< | ( | std::ostream & | os, |
Ellipse const & | e | ||
) |
Definition at line 388 of file Ellipse.cc.
std::ostream & lsst::sphgeom::operator<< | ( | std::ostream & | os, |
Interval1d const & | i | ||
) |
Definition at line 35 of file Interval1d.cc.
std::ostream & lsst::sphgeom::operator<< | ( | std::ostream & | os, |
LonLat const & | p | ||
) |
std::ostream & lsst::sphgeom::operator<< | ( | std::ostream & | os, |
Matrix3d const & | m | ||
) |
std::ostream & lsst::sphgeom::operator<< | ( | std::ostream & | os, |
NormalizedAngleInterval const & | i | ||
) |
Definition at line 284 of file NormalizedAngleInterval.cc.
std::ostream & lsst::sphgeom::operator<< | ( | std::ostream & | os, |
RangeSet const & | s | ||
) |
std::ostream & lsst::sphgeom::operator<< | ( | std::ostream & | os, |
UnitVector3d const & | v | ||
) |
Definition at line 73 of file UnitVector3d.cc.
std::ostream & lsst::sphgeom::operator<< | ( | std::ostream & | os, |
Vector3d const & | v | ||
) |
Definition at line 133 of file Vector3d.cc.
int lsst::sphgeom::orientation | ( | UnitVector3d const & | a, |
UnitVector3d const & | b, | ||
UnitVector3d const & | c | ||
) |
orientation
computes and returns the orientations of 3 unit vectors a, b and c.
The return value is +1 if the vectors are in counter-clockwise orientation, 0 if they are coplanar, colinear or identical, and -1 if they are in clockwise orientation.
This is equivalent to computing the sign of the scalar triple product a · (b x c), which is the sign of the determinant of the 3x3 matrix with a, b and c as columns/rows.
The implementation proceeds by first computing a double precision approximation, and then falling back to arbitrary precision arithmetic when necessary. Consequently, the result is exact.
Definition at line 135 of file orientation.cc.
orientationExact
computes and returns the orientations of 3 vectors a, b and c, which need not be normalized but are assumed to have finite components.
The return value is +1 if the vectors a, b, and c are in counter-clockwise orientation, 0 if they are coplanar, colinear, or identical, and -1 if they are in clockwise orientation. The implementation uses arbitrary precision arithmetic to avoid floating point rounding error, underflow and overflow.
Definition at line 76 of file orientation.cc.
int lsst::sphgeom::orientationX | ( | UnitVector3d const & | b, |
UnitVector3d const & | c | ||
) |
orientationX(b, c)
is equivalent to orientation(UnitVector3d::X(), b, c)
.
Definition at line 227 of file orientation.cc.
int lsst::sphgeom::orientationY | ( | UnitVector3d const & | b, |
UnitVector3d const & | c | ||
) |
orientationY(b, c)
is equivalent to orientation(UnitVector3d::Y(), b, c)
.
Definition at line 232 of file orientation.cc.
int lsst::sphgeom::orientationZ | ( | UnitVector3d const & | b, |
UnitVector3d const & | c | ||
) |
orientationZ(b, c)
is equivalent to orientation(UnitVector3d::Z(), b, c)
.
Definition at line 237 of file orientation.cc.
|
inline |
Definition at line 608 of file RangeSet.h.
|
inline |
|
constexpr |
Definition at line 39 of file constants.h.
|
constexpr |
Definition at line 54 of file constants.h.
|
constexpr |
Definition at line 45 of file constants.h.
|
constexpr |
Definition at line 50 of file constants.h.
|
constexpr |
Definition at line 37 of file constants.h.
|
constexpr |
Definition at line 36 of file constants.h.
|
constexpr |
Definition at line 38 of file constants.h.