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

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> &
• 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

Vector()

No documentation available

Copy constructor

template <int M> Vector(const VectorBase<M, T> &v, T p)

Create a 3d vector from 2d vector and given z value.

Vector(T v)

Create a 2d vector with same value for all components

Vector(T x, T y, T z)

Create a 3d vector from x, y and z values

typedef VectorBase<3, T> base

No documentation available

Vector cross_product(const Vector<3, T> &v) const

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

T & x()

Get reference to vector x value

T x() const

Get vector x value

T & y()

Get reference to vector y value

T y() const

Get vector y value

T & z()

Get reference to vector z value

T z() const

Get vector z value

Valid XHTML 1.0 StrictGenerated by diaxen on Sun Jan 8 00:47:24 2012 using MkDoc