Math::Vector struct reference
[Core module]
Declaration
#include <Goptical/Math/Vector>
namespace Goptical {
namespace Math {
template <int N, typename T = double> struct Vector;
};
};
This struct is a member of the Math namespace.
Description
This class is the general purpose N dimensions vector class.
Class specializations
Members
See also the full member list section for this struct.
Functions
- Vector()
- Vector(const VectorBase<N, T> &v)
- Vector(T v)
- bool close_to(const VectorBase<N, T> &m, T error = [...])
- T len() const
- VectorBase<N, T> magnitude(T newlen) const
- VectorBase<N, T> mul(const VectorBase<N, T> &v) const
- VectorBase<N, T> & neg()
- const VectorBase<N, T> & normalize()
- VectorBase<N, T> normalized() const
- T operator*(const VectorBase<N, T> &v) const
- VectorBase<N, T> operator*(T scale) const
- VectorBase<N, T> operator*(const Matrix<N> &m)
- const VectorBase<N, T> & operator*=(T scale)
- VectorBase<N, T> operator+(const VectorBase<N, T> &v) const
- const VectorBase<N, T> & operator+=(const VectorBase<N, T> &v)
- VectorBase<N, T> operator-(const VectorBase<N, T> &v) const
- VectorBase<N, T> operator-() const
- const VectorBase<N, T> & operator-=(const VectorBase<N, T> &v)
- VectorBase<N, T> operator/(T scale) const
- VectorBase<N, T> operator/(const VectorBase<N, T> &v) const
- const VectorBase<N, T> & operator/=(T scale)
- bool operator==(const VectorBase<N, 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)
Members detail
No documentation available
No documentation available
Create a 2d vector with same value for all components