50template <
class DT>
class Tvec3;
71 inline explicit Tvec2(
const DT value = 0)
92 Superclass::_buffer[0] =
px;
93 Superclass::_buffer[1] =
py;
106 Superclass::_buffer[0] = v[0] / v[2];
107 Superclass::_buffer[1] = v[1] / v[2];
111 Superclass::_buffer[0] = v[0];
112 Superclass::_buffer[1] = v[1];
124 Superclass::_buffer[0] = v[1];
125 Superclass::_buffer[1] = v[2];
128 Superclass::_buffer[0] = v[0];
129 Superclass::_buffer[1] = v[2];
132 Superclass::_buffer[0] = v[0];
133 Superclass::_buffer[1] = v[1];
Template class for vector arithmetic with floating point datatypes.
Declaration of float vector type traits.
Tvec2(const DT px, const DT py)
Constructor building the vector px and py.
Tvec2(const Superclass &v)
Copy constructor from FloatingPointVector.
Tvec3< DT > affinePoint() const
Builds a homogeneous Tvec3point from *this and returns it, i.e., leaves all components unchanged and ...
void assign(const DT px, const DT py)
Sets all components to the passed values.
Tvec3< DT > affineVec() const
Builds a homogeneous Tvec3vector from *this and returns it, i.e., leaves all components unchanged and...
Tvec2(const DT value=0)
Default and value constructor.
Tvec2(const Tvec3< DT > &v, const int axis)
Casts v3 to v2.
Tvec2(const Tvec3< DT > &v, const bool normalize)
Casts v to Tvec2.
DT ComponentType
A typedef to 'export' the type of components.
FloatingPointVector< DT, 2, Vector2DataContainer< DT > > Superclass
A typedef as a shorthand for the base class.
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 y
Y-component of the vector, same as _buffer[1].
#define ML_CHECK_FLOAT_THROW(x)
Target mlrange_cast(Source arg)
Generic version of checked ML casts.