All Classes |Grouped Classes |Index

Class CL_Vec3

3D vector More...

Derived from:

None

Derived by:

None

Group:

Math (Core)

#include <ClanLib/core.h>

Class Members:

Attributes:

length

Returns the length (magnitude) of this vector.

normalize

Normalizes this vector.

dot

Dot products this vector with an other vector.

angle

Calculate the angle between this vector and an other vector.

distance

Calculate the distance between this vector and an other vector.

cross

Calculate the cross product between this vector and an other vector.

rotate

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_Vec3

cross

Calculate the cross product between two vectors.

dot

Dot products between two vectors.

normalize

Normalizes a vector.

rotate

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_Vec3c), unsigned char (CL_Vec3uc), short (CL_Vec3s),unsigned short (CL_Vec3us), int (CL_Vec3i), unsigned int (CL_Vec3ui), float (CL_Vecdf), double (CL_Vec3d)