All Classes |Grouped Classes |Index

Class CL_Vec4

4D vector More...

Derived from:

None

Derived by:

None

Group:

Math (Core)

#include <ClanLib/core.h>

Class Members:

Attributes:

length3

Returns the length (magnitude) of this vector (not taking into account the w ordinate).

length4

Returns the length (magnitude) of this vector (taking into account the w ordinate).

normalize3

Normalizes this vector (not taking into account the w ordinate)

normalize4

Normalizes this vector (taking into account the w ordinate)

dot3

Dot products this vector with an other vector (not taking into account the w ordinate).

dot4

Dot products this vector with an other vector (taking into account the w ordinate).

angle3

Calculate the angle between this vector and an other vector (not taking into account the w ordinate).

distance3

Calculate the distance between this vector and an other vector (not taking into account the w ordinate).

distance4

Calculate the distance between this vector and an other vector (taking into account the w ordinate).

cross3

Calculate the cross product between this vector and an other vector (not taking into account the w ordinate).

rotate3

Rotate this vector around an axis. Same as glRotate[f|d](angle, a);.

round

Rounds all components on this vector.


Operators:

operator[]

operator Type *

operator Type *const

operator+=

+= operator.

operator+

operator-=

-= operator.

operator-

operator*=

*= operator.

operator*

operator/=

/= operator.

operator/

/ operator.

operator==

== operator.

operator!=

!= operator.

CL_Vec4

cross3

Calculate the cross product between two vectors (not taking into account the w ordinate).

dot3

Dot products between two vectors (not taking into account the w ordinate).

dot4

Dot products between two vectors (taking into account the w ordinate).

normalize3

Normalizes a vector (not taking into account the w ordinate)

normalize4

Normalizes a vector (taking into account the w ordinate)

rotate3

Rotate a vector around an axis. Same as glRotate[f|d](angle, a);.

round

Rounds all components on a vector.

Detailed description:

These vector templates are defined for:char (CL_Vec4c), unsigned char (CL_Vec4uc), short (CL_Vec4s),unsigned short (CL_Vec4us), int (CL_Vec4i), unsigned int (CL_Vec4ui), float (CL_Vec4f), double (CL_Vec4d)