In file ./include/vob/Vec23.hxx:

template<class T> class Vec23::Vector

A 2D vector

Documentation

A 2D vector

Inheritance:

Vector


Public Methods

[more] Vector ()
Null
[more] Vector (T x, T y)
Given components
[more]template<class F> Vector (const Vector3<F> &v)
Create from another Vector
[more] Vector (T* v)
Create from an array
[more]Vector finitized () const
Making all components finite
[more]Vector operator* (const double &s) const
Multiplication by scalar
[more]template<class U> const Vector& operator*= (const U &s)
In-place multiplication by scalar
[more]Vector normalized () const
Normalize the normalized version of this vector
[more]Vector<T> operator- () const
Vector negation
[more]Vector operator+ (const Vector<T>&v) const
Vector addition
[more]Vector operator- (const Vector<T>&v) const
Vector subtraction
[more]Vector cw90 () const
Return a vector like this, but rotated 90 degrees clockwise
[more]double length () const
Return the length of this vector
[more]double dot (const Vector<T> &v) const
Dot this vector with another
[more]double cross (const Vector<T> &v) const
Cross this 2D vector with another - gives the sine of the angle between the two, multiplied by the lengths.

o Vector()
Null

o Vector(T x, T y)
Given components

otemplate<class F> Vector(const Vector3<F> &v)
Create from another Vector

o Vector(T* v)
Create from an array

oVector finitized() const
Making all components finite

oVector operator*(const double &s) const
Multiplication by scalar

otemplate<class U> const Vector& operator*=(const U &s)
In-place multiplication by scalar

oVector normalized() const
Normalize the normalized version of this vector

oVector<T> operator-() const
Vector negation

oVector operator+(const Vector<T>&v) const
Vector addition

oVector operator-(const Vector<T>&v) const
Vector subtraction

oVector cw90() const
Return a vector like this, but rotated 90 degrees clockwise

odouble length() const
Return the length of this vector

odouble dot(const Vector<T> &v) const
Dot this vector with another

odouble cross(const Vector<T> &v) const
Cross this 2D vector with another - gives the sine of the angle between the two, multiplied by the lengths. Useful for telling which side of a given vector you are on.


This class has no child classes.

Alphabetic index Hierarchy of classes



This page was generated with the help of DOC++.