mirror of
https://github.com/Relintai/gdnative.git
synced 2024-11-14 04:57:22 +01:00
Added operator methods to Vector2 and Vector2i.
This commit is contained in:
parent
6c71a971f5
commit
2f1317bf4d
@ -57,6 +57,15 @@ pandemonium_real GDAPI pandemonium_vector2_get_y(const pandemonium_vector2 *p_se
|
|||||||
return self->y;
|
return self->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pandemonium_real GDAPI *pandemonium_vector2_operator_index(pandemonium_vector2 *p_self, const pandemonium_int p_idx) {
|
||||||
|
Vector2 *self = (Vector2 *)p_self;
|
||||||
|
return (pandemonium_real *)&self->operator[](p_idx);
|
||||||
|
}
|
||||||
|
const pandemonium_real GDAPI *pandemonium_vector2_operator_index_const(const pandemonium_vector2 *p_self, const pandemonium_int p_idx) {
|
||||||
|
const Vector2 *self = (const Vector2 *)p_self;
|
||||||
|
return (const pandemonium_real *)&self->operator[](p_idx);
|
||||||
|
}
|
||||||
|
|
||||||
void GDAPI pandemonium_vector2_set_axis(pandemonium_vector2 *p_self, const pandemonium_vector2_axis p_axis, const pandemonium_real p_value) {
|
void GDAPI pandemonium_vector2_set_axis(pandemonium_vector2 *p_self, const pandemonium_vector2_axis p_axis, const pandemonium_real p_value) {
|
||||||
Vector2 *self = (Vector2 *)p_self;
|
Vector2 *self = (Vector2 *)p_self;
|
||||||
self->operator[](p_axis) = p_value;
|
self->operator[](p_axis) = p_value;
|
||||||
|
@ -57,6 +57,15 @@ pandemonium_real GDAPI pandemonium_vector2i_get_y(const pandemonium_vector2i *p_
|
|||||||
return self->y;
|
return self->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pandemonium_real GDAPI *pandemonium_vector2i_operator_index(pandemonium_vector2i *p_self, const pandemonium_int p_idx) {
|
||||||
|
Vector2i *self = (Vector2i *)p_self;
|
||||||
|
return (pandemonium_real *)&self->operator[](p_idx);
|
||||||
|
}
|
||||||
|
const pandemonium_real GDAPI *pandemonium_vector2i_operator_index_const(const pandemonium_vector2i *p_self, const pandemonium_int p_idx) {
|
||||||
|
const Vector2i *self = (const Vector2i *)p_self;
|
||||||
|
return (const pandemonium_real *)&self->operator[](p_idx);
|
||||||
|
}
|
||||||
|
|
||||||
void GDAPI pandemonium_vector2i_set_axis(pandemonium_vector2i *p_self, const pandemonium_vector2i_axis p_axis, const pandemonium_real p_value) {
|
void GDAPI pandemonium_vector2i_set_axis(pandemonium_vector2i *p_self, const pandemonium_vector2i_axis p_axis, const pandemonium_real p_value) {
|
||||||
Vector2i *self = (Vector2i *)p_self;
|
Vector2i *self = (Vector2i *)p_self;
|
||||||
self->operator[](p_axis) = p_value;
|
self->operator[](p_axis) = p_value;
|
||||||
|
@ -68,6 +68,9 @@ void GDAPI pandemonium_vector2_set_y(pandemonium_vector2 *p_self, const pandemon
|
|||||||
pandemonium_real GDAPI pandemonium_vector2_get_x(const pandemonium_vector2 *p_self);
|
pandemonium_real GDAPI pandemonium_vector2_get_x(const pandemonium_vector2 *p_self);
|
||||||
pandemonium_real GDAPI pandemonium_vector2_get_y(const pandemonium_vector2 *p_self);
|
pandemonium_real GDAPI pandemonium_vector2_get_y(const pandemonium_vector2 *p_self);
|
||||||
|
|
||||||
|
pandemonium_real GDAPI *pandemonium_vector2_operator_index(pandemonium_vector2 *p_self, const pandemonium_int p_idx);
|
||||||
|
const pandemonium_real GDAPI *pandemonium_vector2_operator_index_const(const pandemonium_vector2 *p_self, const pandemonium_int p_idx);
|
||||||
|
|
||||||
void GDAPI pandemonium_vector2_set_axis(pandemonium_vector2 *p_self, const pandemonium_vector2_axis p_axis, const pandemonium_real p_value);
|
void GDAPI pandemonium_vector2_set_axis(pandemonium_vector2 *p_self, const pandemonium_vector2_axis p_axis, const pandemonium_real p_value);
|
||||||
pandemonium_real GDAPI pandemonium_vector2_get_axis(const pandemonium_vector2 *p_self, const pandemonium_vector2_axis p_axis);
|
pandemonium_real GDAPI pandemonium_vector2_get_axis(const pandemonium_vector2 *p_self, const pandemonium_vector2_axis p_axis);
|
||||||
|
|
||||||
|
@ -68,6 +68,9 @@ void GDAPI pandemonium_vector2i_set_y(pandemonium_vector2i *p_self, const pandem
|
|||||||
pandemonium_real GDAPI pandemonium_vector2i_get_x(const pandemonium_vector2i *p_self);
|
pandemonium_real GDAPI pandemonium_vector2i_get_x(const pandemonium_vector2i *p_self);
|
||||||
pandemonium_real GDAPI pandemonium_vector2i_get_y(const pandemonium_vector2i *p_self);
|
pandemonium_real GDAPI pandemonium_vector2i_get_y(const pandemonium_vector2i *p_self);
|
||||||
|
|
||||||
|
pandemonium_real GDAPI *pandemonium_vector2i_operator_index(pandemonium_vector2i *p_self, const pandemonium_int p_idx);
|
||||||
|
const pandemonium_real GDAPI *pandemonium_vector2i_operator_index_const(const pandemonium_vector2i *p_self, const pandemonium_int p_idx);
|
||||||
|
|
||||||
void GDAPI pandemonium_vector2i_set_axis(pandemonium_vector2i *p_self, const pandemonium_vector2i_axis p_axis, const pandemonium_real p_value);
|
void GDAPI pandemonium_vector2i_set_axis(pandemonium_vector2i *p_self, const pandemonium_vector2i_axis p_axis, const pandemonium_real p_value);
|
||||||
pandemonium_real GDAPI pandemonium_vector2i_get_axis(const pandemonium_vector2i *p_self, const pandemonium_vector2i_axis p_axis);
|
pandemonium_real GDAPI pandemonium_vector2i_get_axis(const pandemonium_vector2i *p_self, const pandemonium_vector2i_axis p_axis);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user