lsst.sphgeom gd5d1ca8e18+f0a1800e64
|
This file contains utility function implementations. More...
Functions | |
double | lsst::sphgeom::getMinSquaredChordLength (Vector3d const &v, Vector3d const &a, Vector3d const &b, Vector3d const &n) |
double | lsst::sphgeom::getMaxSquaredChordLength (Vector3d const &v, Vector3d const &a, Vector3d const &b, Vector3d const &n) |
Vector3d | lsst::sphgeom::getWeightedCentroid (UnitVector3d const &v0, UnitVector3d const &v1, UnitVector3d const &v2) |
This file contains utility function implementations.
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.
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.
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.