|
Index
C++ Code Documentation
template <class Number> math::Vector2
File: BASE/math/Vector2.H
Fixed-length base::vector class.
Length N and entries in class Number.
public:
- inline Vector2();
 | void constructor | |
- inline Vector2( Number, Number );
 | constructor | |
- inline Vector2( Number * );
 | constructor | |
- inline Vector2( Vector2<Number> const &a );
 | copy constructor | |
- inline ~Vector2();
 | destructor | |
- inline Vector2<Number> &operator=( Vector2<Number> const &a );
 | assignment operator | |
- inline Number &operator[](uint i);
 | get the i'th element | |
- inline Number const &operator[](uint i) const;
 | get the i'th element | |
- inline void set( Number );
 | set to Number | |
- inline bool operator==( Vector2<Number> const &a );
- inline bool operator!=( Vector2<Number> const &a );
- static inline bool equal( Vector2<Number> const &a, Vector2<Number> const &b, Number epsilon );
- inline void neg();
 | math methods negation: *this = - *this | |
- inline void neg( Vector2<Number> const &a );
 | negation: *this = - a | |
- inline void add( Vector2<Number> const &a );
 | *this += a | |
- inline void add( Vector2<Number> const &a, Vector2<Number> const &b );
 | *this = a + b | |
- inline void sub( Vector2<Number> const &a );
 | *this -= a | |
- inline void sub( Vector2<Number> const &a, Vector2<Number> const &b );
 | *this = a - b | |
- inline void mul( Number a );
 | *this *= a | |
- inline void mul( Number a, Vector2<Number> const &b );
 | *this = a * b | |
- inline void mul( Vector2<Number> const &a, Number b );
 | *this = a * b | |
- inline void mul_add( Vector2<Number> const &a, Number b, Vector2<Number> const &c );
 | *this = a + b * c | |
- inline void mul_add( Number a, Vector2<Number> const &b );
 | *this += a * b | |
- inline void div( Number a );
 | *this /= a | |
- inline void div( Vector2<Number> const &a, Number b );
 | *this = a / b | |
- static inline Number dot( Vector2<Number> const &a, Vector2<Number> const &b );
 | return dot_product( *this, a ) | |
- inline Number norm() const;
- inline Number abs() const;
- inline void normalize();
- static inline Vector2<Number> midpoint( Vector2<Number> const &, Vector2<Number> const & );
- inline void operator+=( Vector2<Number> const &a );
 | operator versions | |
- inline void operator-=( Vector2<Number> const &a );
- inline void operator*=( Number a );
- inline void operator/=( Number a );
- inline Vector2<Number> operator+() const;
 | inefficient versions | |
- inline Vector2<Number> operator-() const;
- inline Vector2<Number> operator+( Vector2<Number> const & ) const;
- inline Vector2<Number> operator-( Vector2<Number> const & ) const;
- friend Vector2<Number> operator* NULL_TMPL_ARGS ( Number, Vector2<Number> const & );
- friend Vector2<Number> operator* NULL_TMPL_ARGS ( Vector2<Number> const &, Number );
- inline Vector2<Number> operator*( Number ) const;
- inline Vector2<Number> operator/( Number ) const;
- friend std::ostream &operator<< NULL_TMPL_ARGS ( std::ostream &o, Vector2<Number> const &a );
- Number *data();
- Number const *data() const;
- Number x, y;
protected:
private:
|