24#ifndef _HUGIN_MATH_VECTOR3_H_
25#define _HUGIN_MATH_VECTOR3_H_
32#define EPSILON 0.0000001
55 Vector3(
double a,
double b,
double c): x(a), y(b), z(c) {}
70 void Set(
double a,
double b,
double c);
73 inline bool operator== (
const Vector3&
v)
const
75 return (
v.x==x &&
v.y==y &&
v.z==z);
79 inline bool operator!= (
const Vector3&
v )
const
88 bool IsNearlyZero()
const;
91 bool IsNearlyEqual(
const Vector3&
v)
const;
160 double NormSquared()
const;
165 return Vector3(
v.z*y -
v.y*z,
v.x*z -
v.z*x,
v.y*x -
v.x*y);
171 return x*
v.x + y*
v.y + z*
v.z;
185 s <<
"[ " <<
v.x <<
", " <<
v.y <<
", " <<
v.z <<
" ]";
std::ostream & operator<<(std::ostream &s, const Vector3 &v)
general : Vector3 is a class for handling 3D Vectors manipulation.
Vector3()
default constructor
Vector3(const Vector3 &v)
copy contructor
double Dot(const Vector3 &v) const
dot product
Vector3 operator*(double Scale) const
operator *(double)
Vector3 operator*=(double Scale)
double multiply
Vector3 operator+=(const Vector3 &v)
operator +=
double x
x,y,z coordinates, 0 at the initialisation
Vector3(double a, double b, double c)
constructor with initialisation
Vector3 operator+(const Vector3 &v) const
operator +
Vector3 Cross(const Vector3 &v) const
cross product
Vector3 operator-() const
Unary minus.
Vector3 operator-(const Vector3 &v) const
operator -
friend Vector3 operator*(double Scale, const Vector3 &v)
operator *
Vector3 operator-=(const Vector3 &v)
operator -=
hugin_utils::FDiff2D operator/(const hugin_utils::FDiff2D &lhs, double val)
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.