48template <
class T =
int>
55 static constexpr extended_type ECOORD_MAX = std::numeric_limits<extended_type>::max();
56 static constexpr extended_type ECOORD_MIN = std::numeric_limits<extended_type>::min();
68 template <
typename CastingType>
92 VECTOR3<T>::extended_type
Dot(
const VECTOR3<T>& aVector )
const;
112 bool operator!=(
const VECTOR3<T>& aVector )
const;
135 return VECTOR3<T>( ( y * aVector.z ) - ( z * aVector.y ),
136 ( z * aVector.x ) - ( x * aVector.z ),
137 ( x * aVector.y ) - ( y * aVector.x )
145 return extended_type{x} * extended_type{aVector.x}
146 + extended_type{y} * extended_type{aVector.y}
147 + extended_type{z} * extended_type{aVector.z};
154 return sqrt( (extended_type) x * x + (extended_type) y * y + (extended_type) z * z );
173 return ( aVector.x == x ) && ( aVector.y == y ) && ( aVector.z == z );
180 return ( aVector.x != x ) || ( aVector.y != y ) || ( aVector.z != z );
Define a general 3D-vector.
Definition vector3.h:50
VECTOR3(const VECTOR3< T > &aVec)
Copy a vector.
Definition vector3.h:77
VECTOR3< T >::extended_type Dot(const VECTOR3< T > &aVector) const
Compute the dot product of self with aVector.
Definition vector3.h:143
VECTOR3()
Construct a 3D-vector with x, y = 0.
Definition vector3.h:117
VECTOR3< T > Normalize()
Compute the normalized vector.
Definition vector3.h:159
bool operator==(const VECTOR3< T > &aVector) const
Not equality operator.
Definition vector3.h:171
VECTOR3< T > Cross(const VECTOR3< T > &aVector) const
Compute cross product of self with aVector.
Definition vector3.h:133
T EuclideanNorm() const
Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2).
Definition vector3.h:152
VECTOR3(const VECTOR3< CastingType > &aVec)
Initializes a vector from another specialization.
Definition vector3.h:69
Traits class for VECTOR2.
Definition vector3.h:28
T extended_type
< extended range/precision types used by operations involving multiple multiplications to prevent ove...
Definition vector3.h:31
double EuclideanNorm(const wxPoint &vector)
Euclidean norm of a 2D vector.
Definition trigo.h:146