Math::Vector<2,T> struct reference
[Core module]
Declaration
#include <Goptical/Math/Vector>
namespace Goptical {
namespace Math {
template <typename T> struct Vector<2, T>;
};
};
This struct is a member of the Math namespace.
This template struct is a specialization of Vector.
Description
This class implements 2d vectors.
The Math namespace contains some commonly used constant vector objects.
Members
See also the full member list section for this struct.
Types
- typedef [...] base
- typedef [...] put_delegate_t
Functions
- Vector()
- Vector(const VectorBase<2, T> &v)
- template Vector(const VectorBase<M, T> &v, T p)
- Vector(T v)
- Vector(T x, T y)
- template Vector(const VectorBase<N, T> &v, unsigned int c0, unsigned int c1)
- bool close_to(const VectorBase<2, T> &m, T error = [...])
- T cross_product(const Vector<2, T> &v) const
- T len() const
- VectorBase<2, T> magnitude(T newlen) const
- VectorBase<2, T> mul(const VectorBase<2, T> &v) const
- VectorBase<2, T> & neg()
- const VectorBase<2, T> & normalize()
- VectorBase<2, T> normalized() const
- T operator*(const VectorBase<2, T> &v) const
- VectorBase<2, T> operator*(T scale) const
- VectorBase<2, T> operator*(const Matrix<N> &m)
- const VectorBase<2, T> & operator*=(T scale)
- VectorBase<2, T> operator+(const VectorBase<2, T> &v) const
- const VectorBase<2, T> & operator+=(const VectorBase<2, T> &v)
- VectorBase<2, T> operator-(const VectorBase<2, T> &v) const
- VectorBase<2, T> operator-() const
- const VectorBase<2, T> & operator-=(const VectorBase<2, T> &v)
- VectorBase<2, T> operator/(T scale) const
- VectorBase<2, T> operator/(const VectorBase<2, T> &v) const
- const VectorBase<2, T> & operator/=(T scale)
- bool operator==(const VectorBase<2, T> &m) const
- T operator[](int n) const
- T & operator[](int n)
- template VectorBase<M, T> select(unsigned int bitmask, const VectorBase<M, T> &v) const
- void set(T value)
- T & x()
- T x() const
- T & y()
- T y() const
Members detail
No documentation available
No documentation available
No documentation available
Create a 2d vector with same value for all components
Create a 2d vector from x and y z values
Create a 2d vector and initialize from specified components of an other vector
No documentation available
T cross_product(const Vector<2, T> &v) const
No documentation available
typedef delegate<void(const Math::Vector2&)> put_delegate_t
No documentation available
Get reference to vector x value
Get vector x value
Get reference to vector y value
Get vector y value