CL_Vector - ClanLib Game SDK

Home | All Classes | Grouped Classes | Index | Search

# Class CL_Vector

Vector class. More...

Derived from: none
Derived by: none
Group: Core (Math)

#include <ClanLib/core.h>

Variables:

x | x coordinate
y | y coordinate
z | z coordinate
w | w coordinate

Construction:

CL_Vector | Constructor that initializes a vector

Attributes:

norm | Returns the (euclid) norm of the vector.
normalize | Normalizes the vector (not taking into account the w ordinate!)
dot | Dot products this vector with an other vector.
angle | Calculate the angle between this vector and an other vector.
cross | Calculate the cross product between this vector and an other vector.
rotate | Rotate vector around an axis.
round | Rounds all components.

Operators:

operator * | Scalar product (vector * scalar)
| Scalar product (scalar * vector)
operator += | += operator.
operator -= | -= operator.
operator * = | *= operator (scalar multiplication).
operator + | + operator.
operator - | - operator.
operator = | assignment operator.
operator == | Returns true if current vector equals v.
operator != | Returns false if current vector equals v.
operator [] | Returns reference to n-th ordinate (0. == x, 1. == y, ...).

Detailed description:

!group=Core/Math! !header=core.h!

This class provides basic functions and operators for working with vectors.

Questions or comments, write to the ClanLib mailing list.