gz/math/Vector3.hh
static Vector3 Normal(const Vector3< T > &_v1, const Vector3< T > &_v2, const Vector3< T > &_v3)
Get a normal vector to a triangle.
Definition: gz/math/Vector3.hh:258
friend Vector3< T > operator-(const T _s, const Vector3< T > &_v)
Subtraction operators.
Definition: gz/math/Vector3.hh:439
const Vector3< T > & operator*=(T _v)
Multiplication operator.
Definition: gz/math/Vector3.hh:551
const Vector3< T > operator/(const Vector3< T > &_pt) const
Division operator.
Definition: gz/math/Vector3.hh:461
Definition: gz/math/AdditivelySeparableScalarField3.hh:27
Vector3(const Vector3< T > &_v)
Copy constructor.
Definition: gz/math/Vector3.hh:82
Vector3 Perpendicular() const
Return a vector that is perpendicular to this one.
Definition: gz/math/Vector3.hh:238
T Length() const
Returns the length (magnitude) of the vector.
Definition: gz/math/Vector3.hh:122
bool operator==(const Vector3< T > &_v) const
Equal to operator.
Definition: gz/math/Vector3.hh:576
T AbsDot(const Vector3< T > &_v) const
Return the absolute dot product of this vector and another vector. This is similar to the Dot functio...
Definition: gz/math/Vector3.hh:220
T & X()
Get a mutable reference to the x value.
Definition: gz/math/Vector3.hh:675
T SquaredLength() const
Return the square of the length (magnitude) of the vector.
Definition: gz/math/Vector3.hh:129
bool Equal(const Vector3< T > &_v) const
Equality test.
Definition: gz/math/Vector3.hh:645
static const Vector3 One
math::Vector3(1, 1, 1)
Definition: gz/math/Vector3.hh:47
T & Y()
Get a mutable reference to the y value.
Definition: gz/math/Vector3.hh:682
friend Vector3< T > operator+(const T _s, const Vector3< T > &_v)
Addition operators.
Definition: gz/math/Vector3.hh:378
T & Z()
Get a mutable reference to the z value.
Definition: gz/math/Vector3.hh:689
Vector3< T > operator+(const T _s) const
Addition operators.
Definition: gz/math/Vector3.hh:367
bool IsFinite() const
See if a point is finite (e.g., not nan)
Definition: gz/math/Vector3.hh:592
Vector3 & operator=(T _v)
Assignment operator.
Definition: gz/math/Vector3.hh:333
bool operator<(const Vector3< T > &_pt) const
Less than operator.
Definition: gz/math/Vector3.hh:719
const Vector3< T > & operator-=(const Vector3< T > &_pt)
Subtraction assignment operators.
Definition: gz/math/Vector3.hh:416
Vector3 Round()
Round to near whole number, return the result.
Definition: gz/math/Vector3.hh:164
void Min(const Vector3< T > &_v)
Set this vector's components to the minimum of itself and the passed in vector.
Definition: gz/math/Vector3.hh:294
const Vector3< T > & operator/=(const Vector3< T > &_pt)
Division assignment operator.
Definition: gz/math/Vector3.hh:472
static const Vector3 Zero
math::Vector3(0, 0, 0)
Definition: gz/math/Vector3.hh:44
T isfinite(T... args)
T precision(const T &_a, const unsigned int &_precision)
get value at a specified precision
Definition: gz/math/Helpers.hh:590
static const size_t IGN_TWO_SIZE_T
size_t type with a value of 2
Definition: gz/math/Helpers.hh:233
Vector3 & operator=(const Vector3< T > &_v)
Assignment operator.
Definition: gz/math/Vector3.hh:321
friend std::istream & operator>>(std::istream &_in, Vector3< T > &_pt)
Stream extraction operator.
Definition: gz/math/Vector3.hh:741
static const Vector3 UnitY
math::Vector3(0, 1, 0)
Definition: gz/math/Vector3.hh:53
STL class.
Vector3 Normalized() const
Return a normalized vector.
Definition: gz/math/Vector3.hh:155
Vector3 operator+(const Vector3< T > &_v) const
Addition operator.
Definition: gz/math/Vector3.hh:345
T Max() const
Get the maximum value in the vector.
Definition: gz/math/Vector3.hh:306
T clamp(T _v, T _min, T _max)
Simple clamping function.
Definition: gz/math/Helpers.hh:406
Vector3< T > operator-(const T _s) const
Subtraction operators.
Definition: gz/math/Vector3.hh:428
T setf(T... args)
The Vector3 class represents the generic vector containing 3 elements. Since it's commonly used to ke...
Definition: gz/math/Vector3.hh:41
Vector3< T > operator*(const Vector3< T > &_p) const
Multiplication operator.
Definition: gz/math/Vector3.hh:509
bool operator!=(const Vector3< T > &_v) const
Not equal to operator.
Definition: gz/math/Vector3.hh:585
T operator[](const std::size_t _index) const
Const-qualified array subscript operator.
Definition: gz/math/Vector3.hh:627
T Min() const
Get the minimum value in the vector.
Definition: gz/math/Vector3.hh:313
Vector3< T > operator-(const Vector3< T > &_pt) const
Subtraction operators.
Definition: gz/math/Vector3.hh:406
const Vector3< T > & operator*=(const Vector3< T > &_v)
Multiplication assignment operators.
Definition: gz/math/Vector3.hh:520
void Set(T _x=0, T _y=0, T _z=0)
Set the contents of the vector.
Definition: gz/math/Vector3.hh:185
friend std::ostream & operator<<(std::ostream &_out, const Vector3< T > &_pt)
Stream insertion operator.
Definition: gz/math/Vector3.hh:729
T min(T... args)
T Distance(T _x, T _y, T _z) const
Calc distance to the given point.
Definition: gz/math/Vector3.hh:115
bool Equal(const Vector3 &_v, const T &_tol) const
Equality test with tolerance.
Definition: gz/math/Vector3.hh:565
void Round(int _precision)
Round all values to _precision decimal places.
Definition: gz/math/Vector3.hh:634
const Vector3< T > & operator+=(const T _s)
Addition assignment operator.
Definition: gz/math/Vector3.hh:387
Vector3 operator-() const
Negation operator.
Definition: gz/math/Vector3.hh:398
friend Vector3< T > operator*(T _s, const Vector3< T > &_v)
Multiplication operators.
Definition: gz/math/Vector3.hh:543
T fail(T... args)
Vector3 Normalize()
Normalize the vector length.
Definition: gz/math/Vector3.hh:139
Vector3< T > operator*(T _s) const
Multiplication operators.
Definition: gz/math/Vector3.hh:532
static const Vector3 UnitX
math::Vector3(1, 0, 0)
Definition: gz/math/Vector3.hh:50
void Max(const Vector3< T > &_v)
Set this vector's components to the maximum of itself and the passed in vector.
Definition: gz/math/Vector3.hh:281
const Vector3< T > & operator-=(const T _s)
Subtraction assignment operator.
Definition: gz/math/Vector3.hh:448
static const Vector3 NaN
math::Vector3(NaN, NaN, NaN)
Definition: gz/math/Vector3.hh:59
T Sum() const
Return the sum of the values.
Definition: gz/math/Vector3.hh:94
static const Vector3 UnitZ
math::Vector3(0, 0, 1)
Definition: gz/math/Vector3.hh:56
static const size_t IGN_ZERO_SIZE_T
size_t type with a value of 0
Definition: gz/math/Helpers.hh:227
const Vector3< T > & operator/=(T _v)
Division assignment operator.
Definition: gz/math/Vector3.hh:496
T nearbyint(T... args)
const Vector3 & operator+=(const Vector3< T > &_v)
Addition assignment operator.
Definition: gz/math/Vector3.hh:355
T Dot(const Vector3< T > &_v) const
Return the dot product of this vector and another vector.
Definition: gz/math/Vector3.hh:205
T DistToLine(const Vector3< T > &_pt1, const Vector3 &_pt2)
Get distance to an infinite line defined by 2 points.
Definition: gz/math/Vector3.hh:271
void Correct()
Corrects any nan values.
Definition: gz/math/Vector3.hh:602
const Vector3< T > operator/(T _v) const
Division operator.
Definition: gz/math/Vector3.hh:485
T & operator[](const std::size_t _index)
Array subscript operator.
Definition: gz/math/Vector3.hh:618
T max(T... args)
T Distance(const Vector3< T > &_pt) const
Calc distance to the given point.
Definition: gz/math/Vector3.hh:102
Vector3 Abs() const
Get the absolute value of the vector.
Definition: gz/math/Vector3.hh:229
STL class.
Vector3(const T &_x, const T &_y, const T &_z)
Constructor.
Definition: gz/math/Vector3.hh:73
Vector3 Cross(const Vector3< T > &_v) const
Return the cross product of this vector with another vector.
Definition: gz/math/Vector3.hh:195
Vector3 Rounded() const
Get a rounded version of this vector.
Definition: gz/math/Vector3.hh:174