Unlike some other libraries, I don't make a difference between points and vectors.
IpeVector::IpeVector | ( | ) | [inline] |
Uninitialized vector.
IpeVector::IpeVector | ( | IpeAngle | alpha | ) | [explicit] |
Construct a unit vector with this direction.
double IpeVector::SqLen | ( | ) | const [inline] |
Return square of Euclidean length.
IpeAngle IpeVector::Angle | ( | ) | const |
Return angle of the vector (with positive x-direction).
Returns zero for the zero vector.
IpeVector IpeVector::Normalized | ( | ) | const |
Return this vector normalized (with length one).
IpeVector IpeVector::Orthogonal | ( | ) | const |
Return this vector turned 90 degrees to the left.
double IpeVector::Factorize | ( | IpeVector & | unit | ) | const |
Normalizes this vector into unit and returns length. If this is the zero vector, unit is set to (1,0).
Snap to nearby vertex.
If distance between mouse and this vector is less than bound, set pos to this vector and bound to the distance, and return true
.
bool IpeVector::operator== | ( | const IpeVector & | rhs | ) | const [inline] |
Equality.
bool IpeVector::operator!= | ( | const IpeVector & | rhs | ) | const [inline] |
Inequality.
void IpeVector::operator+= | ( | const IpeVector & | rhs | ) | [inline] |
Vector-addition.
void IpeVector::operator-= | ( | const IpeVector & | rhs | ) | [inline] |
Vector-subtraction.
void IpeVector::operator *= | ( | double | rhs | ) | [inline] |
Multiply vector by scalar.
IpeVector IpeVector::operator * | ( | double | rhs | ) | const [inline] |
Vector * scalar.
IpeVector IpeVector::Zero [static] |
The origin (zero vector).
Vector coordinates are public.