Index

C++ Code Documentation

template <class Number> math::Vector3

File: BASE/math/Vector3.H

Fixed-length base::vector class. Length N and entries in class Number.

public:
  • inline Vector3();
    void constructor
  • inline Vector3( Number, Number, Number );
    constructor
  • inline Vector3( Number * );
    constructor
  • inline Vector3( Vector3<Number> const &a );
    copy constructor
  • inline ~Vector3();
    destructor
  • inline Vector3<Number> &operator=( Vector3<Number> const &a );
    assignment operators
  • 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==( Vector3<Number> const &a );
    comparison
  • inline bool operator!=( Vector3<Number> const &a );
  • static inline bool equal( Vector3<Number> const &a, Vector3<Number> const &b, Number epsilon );
    fuzzy comparison
  • inline void neg();
    negation: *this = - *this
  • inline void neg( Vector3<Number> const &a );
    negation: *this = - a
  • inline void add( Vector3<Number> const &a );
    *this += a
  • inline void add( Vector3<Number> const &a, Vector3<Number> const &b );
    *this = a + b
  • inline void sub( Vector3<Number> const &a );
    *this -= a
  • inline void sub( Vector3<Number> const &a, Vector3<Number> const &b );
    *this = a - b
  • inline void mul( Number a );
    *this *= a
  • inline void mul( Number a, Vector3<Number> const &b );
    *this = a * b
  • inline void mul( Vector3<Number> const &a, Number b );
    *this = a * b
  • inline void mul_add( Vector3<Number> const &a, Number b, Vector3<Number> const &c );
    *this = a + b * c
  • inline void mul_add( Number a, Vector3<Number> const &b );
    *this += a * b
  • inline void div( Number a );
    *this /= a
  • inline void div( Vector3<Number> const &a, Number b );
    *this = a / b
  • inline void operator+=( Vector3<Number> const &a );
  • inline void operator-=( Vector3<Number> const &a );
  • inline void operator*=( Number a );
  • inline void operator/=( Number a );
  • inline Vector3<Number> operator+() const;
  • inline Vector3<Number> operator-() const;
  • inline Vector3<Number> operator+( Vector3<Number> const & ) const;
  • inline Vector3<Number> operator-( Vector3<Number> const & ) const;
  • inline Vector3<Number> operator/( Number ) const;
  • friend Vector3<Number> operator* NULL_TMPL_ARGS ( Number, Vector3<Number> const & );
  • friend Vector3<Number> operator* NULL_TMPL_ARGS ( Vector3<Number> const &, Number );
  • inline Vector3<Number> operator*( Number ) const;
  • inline Number norm() const;
  • inline Number abs() const;
  • inline int normalize();
    *this := *this/|*this| returns 0/1 on success/failure
  • static inline Vector3<Number> midpoint( Vector3<Number> const &, Vector3<Number> const & );
  • static inline Number length( Vector3<Number> const &a, Vector3<Number> const &b );
    |a-b|
  • static inline Number dot( Vector3<Number> const &a, Vector3<Number> const &b );
    a.b
  • friend std::ostream &operator<< NULL_TMPL_ARGS ( std::ostream &o, Vector3<Number> const &a );
    write to stream
  • Number *data();
  • Number const *data() const;
  • Number x, y, z;
    public data
protected:
private:


template <class Number> math::Vector3 GANG