![]() | |
![]() | ![]() |
Entire Class Index | Main Class Index | Cross Index | Global Index |
Vector class
Contained in: global
Derived from:
none
Derived by:
none
Group: Core (Math)
#include <ClanLib/core.h>
public function member index: |
||
Construction: |
||
CL_Vector | (float x = 0.0, float y = 0.0, float z = 0.0, float w = 1.0); | |
CL_Vector | (const CL_Vector& other); | |
Attributes: |
||
float | norm | () const; |
void | normalize | (); |
float | dot | (const CL_Vector& v) const; |
float | angle | (const CL_Vector& v) const; |
CL_Vector | cross | (const CL_Vector& v) const; |
CL_Vector | rotate | (float angle, const CL_Vector& a) const; |
void | round | (); |
Operators: |
||
CL_Vector | operator * | (float s); |
void | operator += | (const CL_Vector& v); |
void | operator -= | (const CL_Vector& v); |
void | operator * = | (float s); |
CL_Vector | operator + | (const CL_Vector& v); |
CL_Vector | operator - | (const CL_Vector& v); |
CL_Vector | operator - | (); |
CL_Vector& | operator = | (const CL_Vector& v); |
int | operator == | (const CL_Vector& v) const; |
int | operator != | (const CL_Vector& v) const; |
float& | operator [] | (int n); |
other - vector to copy
v - other vector
Returns - the angle between the two vectors
v - other vector
Returns - the cross product of the two vectors
v - other vector
Returns - the dot product of the two vectors
Returns - the euclid norm of the vector (in R^3)
v - other vector
Returns - false if v equals the current vector, true otherwise
Returns - the scalar product
v - other vector
Returns - true if v equals the current vector, false otherwise
n - number of ordinate (starting with 0)
Returns - reference to the n-th ordinate
angle - angle to rotate
a - rotation axis
Returns - the rotated vector