56template <
class DT>
class Tvec4;
57template <
class DT>
class Tmat3;
58template <
class DT>
class Tmat4;
94 inline Tvec3(
const DT px,
const DT py,
const DT pz)
128 "Normalization with zero fourth component of homogeneous vector "
129 "performed. Leaving vector unchanged.");
171 inline void assign(
const DT px,
const DT py,
const DT pz)
187 const DT div =
static_cast<DT
>(1) / lastComp;
215template <
class DT,
class DT2>
218 return Tvec3<DT>(a[0][0]*v[0] + a[0][1]*v[1] + a[0][2]*v[2],
219 a[1][0]*v[0] + a[1][1]*v[1] + a[1][2]*v[2],
220 a[2][0]*v[0] + a[2][1]*v[1] + a[2][2]*v[2]);
227template <
class DT,
class DT2>
241template <
class DT,
class DT2>
256template <
class DT,
class DT2>
267template <
class DT,
class DT2>
271 a[2]*b[0] - a[0]*b[2],
272 a[0]*b[1] - a[1]*b[0]);
FloatingPointVector(DT value=DT(0))
A 3x3 matrix class of three row vectors.
Tmat3 transpose() const
Returns the transpose of this matrix.
A 4x4 matrix class consisting of four row vectors.
Tmat4< DT > transpose() const
Returns the transposed *this.
Declaration of float vector type traits.
Forward declarations to resolve header file dependencies.
DT ComponentType
A typedef to 'export' the type of components.
FloatingPointVector< DT, 3, Vector3DataContainer< DT > > Superclass
A typedef as a shorthand for the base class.
Tvec3(const Tvec4< DT > &v, const bool normalizeV)
Tvec3< DT > divideByLastComp() const
void assign(const DT px, const DT py, const DT pz)
Sets all components to the passed values.
Tvec3(const Superclass &v)
Tvec3(const Tvec4< DT > &v, const int axis)
Tvec3(const DT px, const DT py, const DT pz)
Constructor building the vector px, py, and pz.
Tvec4< DT > affineVec() const
Tvec3(const Tvec2< DT > &v, const DT pz)
Builds a Tvec3 from a Tvec2 and a scalar. Sets the third entry to user given value pz.
Tvec4< DT > affinePoint() const
Forward declarations to resolve header file dependencies.
Specialized base class for the FloatingPointVectorDataContainerBase.
DT x
X-component of the vector, same as _buffer[0].
DT z
Z-component of the vector, same as _buffer[2].
DT y
Y-component of the vector, same as _buffer[1].
DT _buffer[3]
Data members as vector to provide array access, same as x, y, and z members.
bool MLValuesDifferWOM(MLint8 a, MLint8 b)
#define ML_CHECK_FLOAT(x)
void ML_UTILS_EXPORT printTemplateError(const char *location, MLErrorCode reason, const std::string_view &handling)
Tvec3< MLdouble > Vector3
A vector with three components of type double.
T operator*(const FloatingPointVector< T, size, DataContainer > &a, const FloatingPointVector< T, size, DataContainer > &b)
Tvec3< MLdouble > Vector3d
A vector with three components of type double.
Tvec3< DT > operator^(const Tvec3< DT > &a, const Tvec3< DT2 > &b)
Returns a vector orthogonal to a and b.
Tvec3< MLldouble > Vector3ld
A vector with three components of type long double.
Tvec3< MLfloat > Vector3f
A vector with three components of type float.