49 template <
class DT>
class Tvec3;
92 Superclass::_buffer[0] = px;
93 Superclass::_buffer[1] = py;
105 Superclass::_buffer[0] = v[0]/v[2];
106 Superclass::_buffer[1] = v[1]/v[2];
110 Superclass::_buffer[0] = v[0];
111 Superclass::_buffer[1] = v[1];
121 case 0: Superclass::_buffer[0] = v[1];
122 Superclass::_buffer[1] = v[2];
break;
123 case 1: Superclass::_buffer[0] = v[0];
124 Superclass::_buffer[1] = v[2];
break;
125 default: Superclass::_buffer[0] = v[0];
126 Superclass::_buffer[1] = v[1];
break;
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.
Tvec3< DT > affinePoint() const
Builds a homogeneous Tvec3point from *this and returns it, i.e., leaves all components unchanged and ...
Tvec2(const Superclass &v)
Copy constructor from FloatingPointVector.
void assign(const DT px, const DT py)
Sets all components to the passed values.
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.
Tvec3< DT > affineVec() const
Builds a homogeneous Tvec3vector from *this and returns it, i.e., leaves all components unchanged and...
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)
Tvec2< MLdouble > Vector2d
A vector with two components of type double.
Tvec2< MLfloat > Vector2f
A vector with two components of type float.
Tvec2< MLdouble > Vector2
A vector with two components of type double.
Tvec2< MLldouble > Vector2ld
A vector with two components of type long double.