Euphoria
|
A 4d vector. More...
Public Member Functions | |
v4 (float ax, float ay, float az, float aw) | |
v4 (const v3 &a, float aw) | |
v4 (const float *a) | |
Construct the vector from an array. | |
v3 | to_vec3 (float ww) const |
asserts that the w component is what is expected, point=1, vector=0 | |
v3 | to_vec3_persp_div () const |
returns a 3d vector using perspective division | |
float * | get_data_ptr () |
returns an array to the data | |
const float * | get_data_ptr () const |
returns an array to the data | |
bool | operator== (const v4 &rhs)=delete |
Public Attributes | |
float | x |
float | y |
float | z |
float | w |
A 4d vector.
It represents a homogeneous coordinate/projective coordinate.
a | the xyz components |
aw | the w component, point=1, vector=0 |
Construct the vector from an array.
It is assumed the array is of at least 4 elements in xyzw order.
float * eu::v4::get_data_ptr | ( | ) |
returns an array to the data
asserts that the w component is what is expected, point=1, vector=0
v3 eu::v4::to_vec3_persp_div | ( | ) | const |
returns a 3d vector using perspective division