Home |All Classes |Grouped Classes |Index |Search

Class CL_Vector

Vector class. More...

Derived from:

None

Derived by:

None

Group:

Math (Core)

#include <ClanLib/core.h>

Class Members:

Construction:

CL_Vector

Constructor that initializes a vector.


Attributes:

length

Returns the length (magnitude) 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).

operator+=

+= operator.

operator-=

-= operator.

operator *=

*= operator (scalar multiplication).

operator+

+ operator.

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, ...).

operator<<

cout's the x,y,z ordinates (meant for debugging).


Variables:

x

x coordinate

y

y coordinate

z

z coordinate

w

w coordinate

Detailed description:

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