Math::Vector<3,T> struct reference
[Core module]
Declaration
#include <Goptical/Math/Vector>
namespace Goptical {
namespace Math {
template <typename T> struct Vector<3, T>;
};
};
This struct is a member of the Math namespace.
This template struct is a specialization of Vector.
Description
This class implements 3d 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<3, T> &v)
- template Vector(const VectorBase<M, T> &v, T p)
- Vector(T v)
- Vector(T x, T y, T z)
- bool close_to(const VectorBase<3, T> &m, T error = [...])
- Vector cross_product(const Vector<3, T> &v) const
- T len() const
- VectorBase<3, T> magnitude(T newlen) const
- VectorBase<3, T> mul(const VectorBase<3, T> &v) const
- VectorBase<3, T> & neg()
- const VectorBase<3, T> & normalize()
- VectorBase<3, T> normalized() const
- T operator*(const VectorBase<3, T> &v) const
- VectorBase<3, T> operator*(T scale) const
- VectorBase<3, T> operator*(const Matrix<N> &m)
- const VectorBase<3, T> & operator*=(T scale)
- VectorBase<3, T> operator+(const VectorBase<3, T> &v) const
- const VectorBase<3, T> & operator+=(const VectorBase<3, T> &v)
- VectorBase<3, T> operator-(const VectorBase<3, T> &v) const
- VectorBase<3, T> operator-() const
- const VectorBase<3, T> & operator-=(const VectorBase<3, T> &v)
- VectorBase<3, T> operator/(T scale) const
- VectorBase<3, T> operator/(const VectorBase<3, T> &v) const
- const VectorBase<3, T> & operator/=(T scale)
- bool operator==(const VectorBase<3, T> &m) const
- T operator[](int n) const
- T & operator[](int n)
- Vector<2, T> project_xy() const
- Vector<2, T> project_zy() const
- 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
- T & z()
- T z() const
Members detail
No documentation available
Copy constructor
Create a 3d vector from 2d vector and given z value.
Create a 2d vector with same value for all components
Create a 3d vector from x, y and z values
No documentation available
Compute vectors cross product
Vector<2, T> project_xy() const
Get a 2d vector formed x and y values.
Vector<2, T> project_zy() const
Get a 2d vector formed z and y values.
typedef delegate<void(const Vector<3,T>&)> 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
Get reference to vector z value
Get vector z value