LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
23 #ifndef LSST_SPHGEOM_UNITVECTOR3D_H_
24 #define LSST_SPHGEOM_UNITVECTOR3D_H_
145 double x()
const {
return _v.
x(); }
147 double y()
const {
return _v.
y(); }
149 double z()
const {
return _v.
z(); }
162 return (v + *
this).
cross(v - *
this);
206 #endif // LSST_SPHGEOM_UNITVECTOR3D_H_
UnitVector3d operator-() const
The unary minus operator negates every component of this unit vector.
Vector3d operator*(double s) const
The multiplication operator returns the component-wise product of this unit vector with scalar s.
UnitVector3d()
The default constructor creates a unit vector equal to (1, 0, 0).
static UnitVector3d northFrom(Vector3d const &v)
northFrom returns the unit vector orthogonal to v that points "north" from v.
UnitVector3d(Vector3d const &v)
double sin(Angle const &a)
double const * getData() const
data returns a pointer to the 3 components of this vector.
LonLat represents a spherical coordinate (longitude/latitude angle) pair.
Vector3d robustCross(UnitVector3d const &v) const
a.robustCross(b) is (b + a).cross(b - a) - twice the cross product of a and b.
double dot(Vector3d const &v) const
dot returns the inner product of this unit vector and v.
Vector3d is a vector in ℝ³ with components stored in double precision.
UnitVector3d(LonLat const &p)
This constructor creates the unit vector corresponding to the point p on the unit sphere.
double operator()(int i) const
The function call operator returns the i-th component of this vector.
UnitVector3d is a unit vector in ℝ³ with components stored in double precision.
Vector3d operator+(Vector3d const &v) const
The addition operator returns the sum of this unit vector and v.
double dot(Vector3d const &v) const
dot returns the inner product of this vector and v.
double normalize()
normalize scales this vector to have unit norm and returns its norm prior to scaling.
This file declares a class for representing vectors in ℝ³.
static UnitVector3d fromNormalized(double x, double y, double z)
fromNormalized returns the unit vector with the given components, which are assumed to correspond to ...
Vector3d cross(Vector3d const &v) const
cross returns the cross product of this vector and v.
Vector3d cross(Vector3d const &v) const
cross returns the cross product of this unit vector and v.
UnitVector3d(UnitVector3d const &v)
Vector3d operator/(double s) const
The division operator returns the component-wise quotient of this unit vector with scalar s.
A base class for image defects.
Vector3d rotatedAround(UnitVector3d const &k, Angle a) const
rotatedAround returns a copy of this vector, rotated around the unit vector k by angle a according to...
UnitVector3d(double x, double y, double z)
Vector3d cwiseProduct(Vector3d const &v) const
cwiseProduct returns the component-wise product of this unit vector and v.
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...
Vector3d cwiseProduct(Vector3d const &v) const
cwiseProduct returns the component-wise product of this vector and v.
This file contains a class representing spherical coordinates.
Angle represents an angle in radians.
static UnitVector3d orthogonalTo(Vector3d const &v)
orthogonalTo returns an arbitrary unit vector that is orthogonal to v.
static UnitVector3d orthogonalTo(NormalizedAngle const &a)
orthogonalTo returns the unit vector orthogonal to the meridian with the given longitude.
bool operator==(Vector3d const &v) const
std::ostream & operator<<(std::ostream &, Angle const &)
double const * getData() const
getData returns a pointer to the 3 components of this unit vector.
NormalizedAngle is an angle that lies in the range [0, 2π), with one exception - a NormalizedAngle ca...
Vector3d operator-(Vector3d const &v) const
The subtraction operator returns the difference between this unit vector and v.
static UnitVector3d fromNormalized(Vector3d const &v)
fromNormalized returns the unit vector equal to v, which is assumed to be normalized.
double cos(Angle const &a)
NormalizedAngle getLon() const
bool operator!=(Vector3d const &v) const