Update gdnative api.

This commit is contained in:
Relintai 2024-09-30 17:26:29 +02:00
parent 951ae7b11d
commit 506a0756c5
5 changed files with 36 additions and 12 deletions

View File

@ -691,12 +691,21 @@ pandemonium_vector3 GDAPI pandemonium_basis_xform_normal(const pandemonium_basis
return dest;
}
pandemonium_basis GDAPI pandemonium_basis_looking_at(const pandemonium_vector3 *p_target) {
pandemonium_basis GDAPI pandemonium_basis_looking_at(const pandemonium_vector3 *p_target, const pandemonium_vector3 *p_up, const pandemonium_bool p_use_model_front) {
pandemonium_basis dest;
const Vector3 *target = (const Vector3 *)p_target;
*((Basis *)&dest) = Basis::create_looking_at(*target);
const Vector3 *up = (const Vector3 *)p_up;
*((Basis *)&dest) = Basis::create_looking_at(*target, *up, p_use_model_front);
return dest;
}
void GDAPI pandemonium_basis_set_look_at(pandemonium_basis *p_self, const pandemonium_vector3 *p_target, const pandemonium_vector3 *p_up, const pandemonium_bool p_use_model_front) {
Basis *self = (Basis *)p_self;
const Vector3 *target = (const Vector3 *)p_target;
const Vector3 *up = (const Vector3 *)p_up;
self->set_look_at(*target, *up, p_use_model_front);
}
pandemonium_basis GDAPI pandemonium_basis_looking_at_up(const pandemonium_vector3 *p_target, const pandemonium_vector3 *p_up) {
pandemonium_basis dest;
const Vector3 *target = (const Vector3 *)p_target;

View File

@ -94,20 +94,20 @@ void GDAPI pandemonium_transform_rotate_basis(pandemonium_transform *p_self, con
self->rotate_basis(*axis, p_phi);
}
void GDAPI pandemonium_transform_set_look_at(pandemonium_transform *p_self, const pandemonium_vector3 *p_eye, const pandemonium_vector3 *p_target, const pandemonium_vector3 *p_up) {
void GDAPI pandemonium_transform_set_look_at(pandemonium_transform *p_self, const pandemonium_vector3 *p_eye, const pandemonium_vector3 *p_target, const pandemonium_vector3 *p_up, const pandemonium_bool p_use_model_front) {
Transform *self = (Transform *)p_self;
const Vector3 *eye = (const Vector3 *)p_eye;
const Vector3 *target = (const Vector3 *)p_target;
const Vector3 *up = (const Vector3 *)p_up;
self->set_look_at(*eye, *target, *up);
self->set_look_at(*eye, *target, *up, p_use_model_front);
}
pandemonium_transform GDAPI pandemonium_transform_looking_at(const pandemonium_transform *p_self, const pandemonium_vector3 *p_target, const pandemonium_vector3 *p_up) {
pandemonium_transform GDAPI pandemonium_transform_looking_at(const pandemonium_transform *p_self, const pandemonium_vector3 *p_target, const pandemonium_vector3 *p_up, const pandemonium_bool p_use_model_front) {
pandemonium_transform dest;
const Transform *self = (const Transform *)p_self;
const Vector3 *target = (const Vector3 *)p_target;
const Vector3 *up = (const Vector3 *)p_up;
*((Transform *)&dest) = self->looking_at(*target, *up);
*((Transform *)&dest) = self->looking_at(*target, *up, p_use_model_front);
return dest;
}

View File

@ -1699,7 +1699,19 @@
"name": "pandemonium_basis_looking_at",
"return_type": "pandemonium_basis",
"arguments": [
["const pandemonium_vector3 *", "p_target"]
["const pandemonium_vector3 *", "p_target"],
["const pandemonium_vector3 *", "p_up"],
["const pandemonium_bool", "p_use_model_front"]
]
},
{
"name": "pandemonium_basis_set_look_at",
"return_type": "void",
"arguments": [
["pandemonium_basis *", "p_self"],
["const pandemonium_vector3 *", "p_target"],
["const pandemonium_vector3 *", "p_up"],
["const pandemonium_bool", "p_use_model_front"]
]
},
{
@ -6733,7 +6745,8 @@
["pandemonium_transform *", "p_self"],
["const pandemonium_vector3 *", "p_eye"],
["const pandemonium_vector3 *", "p_target"],
["const pandemonium_vector3 *", "p_up"]
["const pandemonium_vector3 *", "p_up"],
["const pandemonium_bool", "p_use_model_front"]
]
},
{
@ -6742,7 +6755,8 @@
"arguments": [
["const pandemonium_transform *", "p_self"],
["const pandemonium_vector3 *", "p_target"],
["const pandemonium_vector3 *", "p_up"]
["const pandemonium_vector3 *", "p_up"],
["const pandemonium_bool", "p_use_model_front"]
]
},
{

View File

@ -213,7 +213,8 @@ pandemonium_basis GDAPI pandemonium_basis_get_normal_xform_basis(const pandemoni
pandemonium_vector3 GDAPI pandemonium_basis_xform_normal_fast(const pandemonium_basis *p_self, const pandemonium_vector3 *p_vector);
pandemonium_vector3 GDAPI pandemonium_basis_xform_normal(const pandemonium_basis *p_self, const pandemonium_vector3 *p_vector);
pandemonium_basis GDAPI pandemonium_basis_looking_at(const pandemonium_vector3 *p_target);
pandemonium_basis GDAPI pandemonium_basis_looking_at(const pandemonium_vector3 *p_target, const pandemonium_vector3 *p_up, const pandemonium_bool p_use_model_front);
void GDAPI pandemonium_basis_set_look_at(pandemonium_basis *p_self, const pandemonium_vector3 *p_target, const pandemonium_vector3 *p_up, const pandemonium_bool p_use_model_front);
pandemonium_basis GDAPI pandemonium_basis_looking_at_up(const pandemonium_vector3 *p_target, const pandemonium_vector3 *p_up);
pandemonium_basis GDAPI pandemonium_basis_from_scale(const pandemonium_vector3 *p_scale);

View File

@ -76,9 +76,9 @@ void GDAPI pandemonium_transform_rotate(pandemonium_transform *p_self, const pan
void GDAPI pandemonium_transform_rotate_local(pandemonium_transform *p_self, const pandemonium_vector3 *p_axis, pandemonium_real p_phi);
void GDAPI pandemonium_transform_rotate_basis(pandemonium_transform *p_self, const pandemonium_vector3 *p_axis, pandemonium_real p_phi);
void GDAPI pandemonium_transform_set_look_at(pandemonium_transform *p_self, const pandemonium_vector3 *p_eye, const pandemonium_vector3 *p_target, const pandemonium_vector3 *p_up);
void GDAPI pandemonium_transform_set_look_at(pandemonium_transform *p_self, const pandemonium_vector3 *p_eye, const pandemonium_vector3 *p_target, const pandemonium_vector3 *p_up, const pandemonium_bool p_use_model_front);
pandemonium_transform GDAPI pandemonium_transform_looking_at(const pandemonium_transform *p_self, const pandemonium_vector3 *p_target, const pandemonium_vector3 *p_up);
pandemonium_transform GDAPI pandemonium_transform_looking_at(const pandemonium_transform *p_self, const pandemonium_vector3 *p_target, const pandemonium_vector3 *p_up, const pandemonium_bool p_use_model_front);
void GDAPI pandemonium_transform_scale(pandemonium_transform *p_self, const pandemonium_vector3 *p_scale);
pandemonium_transform GDAPI pandemonium_transform_scaled(const pandemonium_transform *p_self, const pandemonium_vector3 *p_scale);