Imlemented the new methods for Array, Dictionary, NodePath, Plane.

This commit is contained in:
Relintai 2023-05-30 00:08:00 +02:00
parent c851d2d1b8
commit 74f7f98da0
9 changed files with 183 additions and 81 deletions

View File

@ -30,11 +30,11 @@
#include "gdn/array.h" #include "gdn/array.h"
#include "core/variant/array.h"
#include "core/os/memory.h" #include "core/os/memory.h"
#include "core/variant/array.h"
#include "core/math/color.h"
#include "core/containers/pool_vector.h" #include "core/containers/pool_vector.h"
#include "core/math/color.h"
#include "core/variant/variant.h" #include "core/variant/variant.h"
@ -163,6 +163,12 @@ const pandemonium_variant GDAPI *pandemonium_array_operator_index_const(const pa
return (const pandemonium_variant *)&self->operator[](p_idx); return (const pandemonium_variant *)&self->operator[](p_idx);
} }
void GDAPI pandemonium_array_append_array(pandemonium_array *p_self, const pandemonium_array *p_array) {
Array *self = (Array *)p_self;
const Array *array = (const Array *)p_array;
self->append_array(*array);
}
void GDAPI pandemonium_array_append(pandemonium_array *p_self, const pandemonium_variant *p_value) { void GDAPI pandemonium_array_append(pandemonium_array *p_self, const pandemonium_variant *p_value) {
Array *self = (Array *)p_self; Array *self = (Array *)p_self;
Variant *val = (Variant *)p_value; Variant *val = (Variant *)p_value;
@ -174,6 +180,22 @@ void GDAPI pandemonium_array_clear(pandemonium_array *p_self) {
self->clear(); self->clear();
} }
pandemonium_bool GDAPI pandemonium_array_deep_equal(const pandemonium_array *p_self, const pandemonium_array *p_array) {
const Array *self = (const Array *)p_self;
const Array *array = (const Array *)p_array;
return self->deep_equal(*array);
}
pandemonium_bool GDAPI pandemonium_array_deep_equal_recursion_count(const pandemonium_array *p_self, const pandemonium_array *p_array, pandemonium_int p_recursion_count) {
const Array *self = (const Array *)p_self;
const Array *array = (const Array *)p_array;
return self->deep_equal(*array, p_recursion_count);
}
void GDAPI pandemonium_array_operator_equal(pandemonium_array *p_self, const pandemonium_array *p_array) {
Array *self = (Array *)p_self;
const Array *array = (const Array *)p_array;
self->operator=(*array);
}
pandemonium_int GDAPI pandemonium_array_count(const pandemonium_array *p_self, const pandemonium_variant *p_value) { pandemonium_int GDAPI pandemonium_array_count(const pandemonium_array *p_self, const pandemonium_variant *p_value) {
const Array *self = (const Array *)p_self; const Array *self = (const Array *)p_self;
const Variant *val = (const Variant *)p_value; const Variant *val = (const Variant *)p_value;
@ -209,7 +231,13 @@ pandemonium_variant GDAPI pandemonium_array_back(const pandemonium_array *p_self
return v; return v;
} }
pandemonium_int GDAPI pandemonium_array_find(const pandemonium_array *p_self, const pandemonium_variant *p_what, const pandemonium_int p_from) { pandemonium_int GDAPI pandemonium_array_find(const pandemonium_array *p_self, const pandemonium_variant *p_what) {
const Array *self = (const Array *)p_self;
const Variant *val = (const Variant *)p_what;
return self->find(*val);
}
pandemonium_int GDAPI pandemonium_array_find_from(const pandemonium_array *p_self, const pandemonium_variant *p_what, const pandemonium_int p_from) {
const Array *self = (const Array *)p_self; const Array *self = (const Array *)p_self;
const Variant *val = (const Variant *)p_what; const Variant *val = (const Variant *)p_what;
return self->find(*val, p_from); return self->find(*val, p_from);
@ -261,6 +289,13 @@ pandemonium_variant GDAPI pandemonium_array_pop_front(pandemonium_array *p_self)
return v; return v;
} }
pandemonium_variant GDAPI pandemonium_array_pop_at(pandemonium_array *p_self, pandemonium_int p_pos) {
pandemonium_variant dest;
Array *self = (Array *)p_self;
*((Variant *)&dest) = self->pop_at(p_pos);
return dest;
}
void GDAPI pandemonium_array_push_back(pandemonium_array *p_self, const pandemonium_variant *p_value) { void GDAPI pandemonium_array_push_back(pandemonium_array *p_self, const pandemonium_variant *p_value) {
Array *self = (Array *)p_self; Array *self = (Array *)p_self;
const Variant *val = (const Variant *)p_value; const Variant *val = (const Variant *)p_value;
@ -278,12 +313,23 @@ void GDAPI pandemonium_array_remove(pandemonium_array *p_self, const pandemonium
self->remove(p_idx); self->remove(p_idx);
} }
void GDAPI pandemonium_array_fill(pandemonium_array *p_self, const pandemonium_variant *p_value) {
Array *self = (Array *)p_self;
const Variant *value = (const Variant *)p_value;
self->fill(*value);
}
void GDAPI pandemonium_array_resize(pandemonium_array *p_self, const pandemonium_int p_size) { void GDAPI pandemonium_array_resize(pandemonium_array *p_self, const pandemonium_int p_size) {
Array *self = (Array *)p_self; Array *self = (Array *)p_self;
self->resize(p_size); self->resize(p_size);
} }
pandemonium_int GDAPI pandemonium_array_rfind(const pandemonium_array *p_self, const pandemonium_variant *p_what, const pandemonium_int p_from) { pandemonium_int GDAPI pandemonium_array_rfind(const pandemonium_array *p_self, const pandemonium_variant *p_what) {
const Array *self = (const Array *)p_self;
const Variant *val = (const Variant *)p_what;
return self->rfind(*val);
}
pandemonium_int GDAPI pandemonium_array_rfind_from(const pandemonium_array *p_self, const pandemonium_variant *p_what, const pandemonium_int p_from) {
const Array *self = (const Array *)p_self; const Array *self = (const Array *)p_self;
const Variant *val = (const Variant *)p_what; const Variant *val = (const Variant *)p_what;
return self->rfind(*val, p_from); return self->rfind(*val, p_from);
@ -320,7 +366,15 @@ void GDAPI pandemonium_array_destroy(pandemonium_array *p_self) {
((Array *)p_self)->~Array(); ((Array *)p_self)->~Array();
} }
pandemonium_array GDAPI pandemonium_array_duplicate(const pandemonium_array *p_self, const pandemonium_bool p_deep) { pandemonium_array GDAPI pandemonium_array_duplicate(const pandemonium_array *p_self) {
const Array *self = (const Array *)p_self;
pandemonium_array res;
Array *val = (Array *)&res;
memnew_placement(val, Array);
*val = self->duplicate();
return res;
}
pandemonium_array GDAPI pandemonium_array_duplicate_deep(const pandemonium_array *p_self, const pandemonium_bool p_deep) {
const Array *self = (const Array *)p_self; const Array *self = (const Array *)p_self;
pandemonium_array res; pandemonium_array res;
Array *val = (Array *)&res; Array *val = (Array *)&res;
@ -329,7 +383,23 @@ pandemonium_array GDAPI pandemonium_array_duplicate(const pandemonium_array *p_s
return res; return res;
} }
pandemonium_array GDAPI pandemonium_array_slice(const pandemonium_array *p_self, const pandemonium_int p_begin, const pandemonium_int p_end, const pandemonium_int p_step, const pandemonium_bool p_deep) { pandemonium_array GDAPI pandemonium_array_slice(const pandemonium_array *p_self, const pandemonium_int p_begin, const pandemonium_int p_end) {
const Array *self = (const Array *)p_self;
pandemonium_array res;
Array *val = (Array *)&res;
memnew_placement(val, Array);
*val = self->slice(p_begin, p_end);
return res;
}
pandemonium_array GDAPI pandemonium_array_slice_step(const pandemonium_array *p_self, const pandemonium_int p_begin, const pandemonium_int p_end, const pandemonium_int p_step) {
const Array *self = (const Array *)p_self;
pandemonium_array res;
Array *val = (Array *)&res;
memnew_placement(val, Array);
*val = self->slice(p_begin, p_end, p_step);
return res;
}
pandemonium_array GDAPI pandemonium_array_slice_step_deep(const pandemonium_array *p_self, const pandemonium_int p_begin, const pandemonium_int p_end, const pandemonium_int p_step, const pandemonium_bool p_deep) {
const Array *self = (const Array *)p_self; const Array *self = (const Array *)p_self;
pandemonium_array res; pandemonium_array res;
Array *val = (Array *)&res; Array *val = (Array *)&res;

View File

@ -32,8 +32,8 @@
#include "core/variant/variant.h" #include "core/variant/variant.h"
// core/variant.h before to avoid compile errors with MSVC // core/variant.h before to avoid compile errors with MSVC
#include "core/variant/dictionary.h"
#include "core/io/json.h" #include "core/io/json.h"
#include "core/variant/dictionary.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -152,6 +152,17 @@ pandemonium_variant GDAPI *pandemonium_dictionary_next(const pandemonium_diction
return (pandemonium_variant *)self->next(key); return (pandemonium_variant *)self->next(key);
} }
pandemonium_bool GDAPI pandemonium_dictionary_deep_equal(const pandemonium_dictionary *p_self, const pandemonium_dictionary *p_dictionary) {
const Dictionary *self = (const Dictionary *)p_self;
const Dictionary *dictionary = (const Dictionary *)p_dictionary;
return self->deep_equal(*dictionary);
}
pandemonium_bool GDAPI pandemonium_dictionary_deep_equal_recursion_count(const pandemonium_dictionary *p_self, const pandemonium_dictionary *p_dictionary, pandemonium_int p_recursion_count) {
const Dictionary *self = (const Dictionary *)p_self;
const Dictionary *dictionary = (const Dictionary *)p_dictionary;
return self->deep_equal(*dictionary, p_recursion_count);
}
pandemonium_bool GDAPI pandemonium_dictionary_operator_equal(const pandemonium_dictionary *p_self, const pandemonium_dictionary *p_b) { pandemonium_bool GDAPI pandemonium_dictionary_operator_equal(const pandemonium_dictionary *p_self, const pandemonium_dictionary *p_b) {
const Dictionary *self = (const Dictionary *)p_self; const Dictionary *self = (const Dictionary *)p_self;
const Dictionary *b = (const Dictionary *)p_b; const Dictionary *b = (const Dictionary *)p_b;
@ -184,7 +195,13 @@ pandemonium_variant GDAPI pandemonium_dictionary_get_with_default(const pandemon
return raw_dest; return raw_dest;
} }
void GDAPI pandemonium_dictionary_merge(pandemonium_dictionary *p_self, const pandemonium_dictionary *p_dictionary, const pandemonium_bool p_overwrite) { void GDAPI pandemonium_dictionary_merge(pandemonium_dictionary *p_self, const pandemonium_dictionary *p_dictionary) {
Dictionary *self = (Dictionary *)p_self;
const Dictionary *dictionary = (const Dictionary *)p_dictionary;
self->merge(*dictionary);
}
void GDAPI pandemonium_dictionary_merge_overwrite(pandemonium_dictionary *p_self, const pandemonium_dictionary *p_dictionary, const pandemonium_bool p_overwrite) {
Dictionary *self = (Dictionary *)p_self; Dictionary *self = (Dictionary *)p_self;
const Dictionary *dictionary = (const Dictionary *)p_dictionary; const Dictionary *dictionary = (const Dictionary *)p_dictionary;
self->merge(*dictionary, p_overwrite); self->merge(*dictionary, p_overwrite);

View File

@ -39,6 +39,13 @@ extern "C" {
static_assert(sizeof(pandemonium_node_path) == sizeof(NodePath), "NodePath size mismatch"); static_assert(sizeof(pandemonium_node_path) == sizeof(NodePath), "NodePath size mismatch");
pandemonium_string_name GDAPI pandemonium_node_path_get_sname(const pandemonium_node_path *p_self) {
pandemonium_string_name dest;
const NodePath *self = (const NodePath *)p_self;
*((StringName *)&dest) = self->get_sname();
return dest;
}
void GDAPI pandemonium_node_path_new(pandemonium_node_path *r_dest, const pandemonium_string *p_from) { void GDAPI pandemonium_node_path_new(pandemonium_node_path *r_dest, const pandemonium_string *p_from) {
NodePath *dest = (NodePath *)r_dest; NodePath *dest = (NodePath *)r_dest;
const String *from = (const String *)p_from; const String *from = (const String *)p_from;
@ -112,6 +119,25 @@ pandemonium_bool GDAPI pandemonium_node_path_operator_equal(const pandemonium_no
return *self == *b; return *self == *b;
} }
void GDAPI pandemonium_node_path_simplify(pandemonium_node_path *p_self) {
NodePath *self = (NodePath *)p_self;
self->simplify();
}
pandemonium_node_path GDAPI pandemonium_node_path_simplified(const pandemonium_node_path *p_self) {
pandemonium_node_path dest;
const NodePath *self = (const NodePath *)p_self;
*((NodePath *)&dest) = self->simplified();
return dest;
}
pandemonium_node_path GDAPI pandemonium_node_path_rel_path_to(const pandemonium_node_path *p_self, const pandemonium_node_path *p_np) {
pandemonium_node_path dest;
const NodePath *self = (const NodePath *)p_self;
const NodePath *np = (const NodePath *)p_np;
*((NodePath *)&dest) = self->rel_path_to(*np);
return dest;
}
pandemonium_node_path pandemonium_node_path_get_as_property_path(const pandemonium_node_path *p_self) { pandemonium_node_path pandemonium_node_path_get_as_property_path(const pandemonium_node_path *p_self) {
const NodePath *self = (const NodePath *)p_self; const NodePath *self = (const NodePath *)p_self;
pandemonium_node_path res; pandemonium_node_path res;
@ -121,6 +147,16 @@ pandemonium_node_path pandemonium_node_path_get_as_property_path(const pandemoni
return res; return res;
} }
void GDAPI pandemonium_node_path_prepend_period(pandemonium_node_path *p_self) {
NodePath *self = (NodePath *)p_self;
self->prepend_period();
}
pandemonium_int GDAPI pandemonium_node_path_hash(const pandemonium_node_path *p_self) {
const NodePath *self = (const NodePath *)p_self;
return self->hash();
}
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -65,6 +65,10 @@ pandemonium_string GDAPI pandemonium_plane_as_string(const pandemonium_plane *p_
return ret; return ret;
} }
void GDAPI pandemonium_plane_normalize(pandemonium_plane *p_self) {
Plane *self = (Plane *)p_self;
self->normalize();
}
pandemonium_plane GDAPI pandemonium_plane_normalized(const pandemonium_plane *p_self) { pandemonium_plane GDAPI pandemonium_plane_normalized(const pandemonium_plane *p_self) {
pandemonium_plane dest; pandemonium_plane dest;
const Plane *self = (const Plane *)p_self; const Plane *self = (const Plane *)p_self;
@ -85,6 +89,12 @@ pandemonium_vector3 GDAPI pandemonium_plane_get_any_point(const pandemonium_plan
*((Vector3 *)&dest) = self->get_any_point(); *((Vector3 *)&dest) = self->get_any_point();
return dest; return dest;
} }
pandemonium_vector3 GDAPI pandemonium_plane_get_any_perpendicular_normal(const pandemonium_plane *p_self) {
pandemonium_vector3 dest;
const Plane *self = (const Plane *)p_self;
*((Vector3 *)&dest) = self->get_any_perpendicular_normal();
return dest;
}
pandemonium_bool GDAPI pandemonium_plane_is_point_over(const pandemonium_plane *p_self, const pandemonium_vector3 *p_point) { pandemonium_bool GDAPI pandemonium_plane_is_point_over(const pandemonium_plane *p_self, const pandemonium_vector3 *p_point) {
const Plane *self = (const Plane *)p_self; const Plane *self = (const Plane *)p_self;
@ -144,6 +154,17 @@ pandemonium_plane GDAPI pandemonium_plane_operator_neg(const pandemonium_plane *
return raw_dest; return raw_dest;
} }
pandemonium_bool GDAPI pandemonium_plane_is_equal_approx(const pandemonium_plane *p_self, const pandemonium_plane *p_plane) {
const Plane *self = (const Plane *)p_self;
const Plane *plane = (const Plane *)p_plane;
return self->is_equal_approx(*plane);
}
pandemonium_bool GDAPI pandemonium_plane_is_equal_approx_any_side(const pandemonium_plane *p_self, const pandemonium_plane *p_plane) {
const Plane *self = (const Plane *)p_self;
const Plane *plane = (const Plane *)p_plane;
return self->is_equal_approx_any_side(*plane);
}
pandemonium_bool GDAPI pandemonium_plane_operator_equal(const pandemonium_plane *p_self, const pandemonium_plane *p_b) { pandemonium_bool GDAPI pandemonium_plane_operator_equal(const pandemonium_plane *p_self, const pandemonium_plane *p_b) {
const Plane *self = (const Plane *)p_self; const Plane *self = (const Plane *)p_self;
const Plane *b = (const Plane *)p_b; const Plane *b = (const Plane *)p_b;

View File

@ -25,15 +25,6 @@
}, },
"next": null, "next": null,
"api": [{ "api": [{
"name": "pandemonium_dictionary_merge",
"return_type": "void",
"arguments": [
["pandemonium_dictionary *", "p_self"],
["const pandemonium_dictionary *", "p_dictionary"],
["const pandemonium_bool", "p_overwrite"]
]
},
{
"name": "pandemonium_pool_byte_array_has", "name": "pandemonium_pool_byte_array_has",
"return_type": "pandemonium_bool", "return_type": "pandemonium_bool",
"arguments": [ "arguments": [
@ -235,17 +226,6 @@
["const pandemonium_vector2 *", "p_to"] ["const pandemonium_vector2 *", "p_to"]
] ]
}, },
{
"name": "pandemonium_array_slice",
"return_type": "pandemonium_array",
"arguments": [
["const pandemonium_array *", "p_self"],
["const pandemonium_int", "p_begin"],
["const pandemonium_int", "p_end"],
["const pandemonium_int", "p_step"],
["const pandemonium_bool", "p_deep"]
]
},
{ {
"name": "pandemonium_pool_byte_array_empty", "name": "pandemonium_pool_byte_array_empty",
"return_type": "pandemonium_bool", "return_type": "pandemonium_bool",
@ -374,14 +354,6 @@
["const pandemonium_real", "p_amount"] ["const pandemonium_real", "p_amount"]
] ]
}, },
{
"name": "pandemonium_array_duplicate",
"return_type": "pandemonium_array",
"arguments": [
["const pandemonium_array *", "p_self"],
["const pandemonium_bool", "p_deep"]
]
},
{ {
"name": "pandemonium_array_max", "name": "pandemonium_array_max",
"return_type": "pandemonium_variant", "return_type": "pandemonium_variant",
@ -2964,15 +2936,6 @@
["const pandemonium_array *", "p_self"] ["const pandemonium_array *", "p_self"]
] ]
}, },
{
"name": "pandemonium_array_find",
"return_type": "pandemonium_int",
"arguments": [
["const pandemonium_array *", "p_self"],
["const pandemonium_variant *", "p_what"],
["const pandemonium_int", "p_from"]
]
},
{ {
"name": "pandemonium_array_find_last", "name": "pandemonium_array_find_last",
"return_type": "pandemonium_int", "return_type": "pandemonium_int",
@ -3058,15 +3021,6 @@
["const pandemonium_int", "p_size"] ["const pandemonium_int", "p_size"]
] ]
}, },
{
"name": "pandemonium_array_rfind",
"return_type": "pandemonium_int",
"arguments": [
["const pandemonium_array *", "p_self"],
["const pandemonium_variant *", "p_what"],
["const pandemonium_int", "p_from"]
]
},
{ {
"name": "pandemonium_array_size", "name": "pandemonium_array_size",
"return_type": "pandemonium_int", "return_type": "pandemonium_int",

View File

@ -70,20 +70,21 @@ pandemonium_int GDAPI pandemonium_array_size(const pandemonium_array *p_self);
pandemonium_bool GDAPI pandemonium_array_empty(const pandemonium_array *p_self); pandemonium_bool GDAPI pandemonium_array_empty(const pandemonium_array *p_self);
void GDAPI pandemonium_array_clear(pandemonium_array *p_self); void GDAPI pandemonium_array_clear(pandemonium_array *p_self);
//bool deep_equal(const Array &p_array, int p_recursion_count = 0) const; pandemonium_bool GDAPI pandemonium_array_deep_equal(const pandemonium_array *p_self, const pandemonium_array *p_array);
//bool operator==(const Array &p_array) const; pandemonium_bool GDAPI pandemonium_array_deep_equal_recursion_count(const pandemonium_array *p_self, const pandemonium_array *p_array, pandemonium_int p_recursion_count);
void GDAPI pandemonium_array_operator_equal(pandemonium_array *p_self, const pandemonium_array *p_array);
pandemonium_int GDAPI pandemonium_array_hash(const pandemonium_array *p_self); pandemonium_int GDAPI pandemonium_array_hash(const pandemonium_array *p_self);
//void operator=(const Array &p_array); //bool operator=(const Array &p_array) const;
void GDAPI pandemonium_array_push_back(pandemonium_array *p_self, const pandemonium_variant *p_value); void GDAPI pandemonium_array_push_back(pandemonium_array *p_self, const pandemonium_variant *p_value);
void GDAPI pandemonium_array_append(pandemonium_array *p_self, const pandemonium_variant *p_value); void GDAPI pandemonium_array_append(pandemonium_array *p_self, const pandemonium_variant *p_value);
//void append_array(const Array &p_array); void GDAPI pandemonium_array_append_array(pandemonium_array *p_self, const pandemonium_array *p_array);
void GDAPI pandemonium_array_resize(pandemonium_array *p_self, const pandemonium_int p_size); void GDAPI pandemonium_array_resize(pandemonium_array *p_self, const pandemonium_int p_size);
void GDAPI pandemonium_array_insert(pandemonium_array *p_self, const pandemonium_int p_pos, const pandemonium_variant *p_value); void GDAPI pandemonium_array_insert(pandemonium_array *p_self, const pandemonium_int p_pos, const pandemonium_variant *p_value);
void GDAPI pandemonium_array_remove(pandemonium_array *p_self, const pandemonium_int p_idx); void GDAPI pandemonium_array_remove(pandemonium_array *p_self, const pandemonium_int p_idx);
//void fill(const Variant &p_value); void GDAPI pandemonium_array_fill(pandemonium_array *p_self, const pandemonium_variant *p_value);
pandemonium_variant GDAPI pandemonium_array_front(const pandemonium_array *p_self); pandemonium_variant GDAPI pandemonium_array_front(const pandemonium_array *p_self);
pandemonium_variant GDAPI pandemonium_array_back(const pandemonium_array *p_self); pandemonium_variant GDAPI pandemonium_array_back(const pandemonium_array *p_self);
@ -97,10 +98,10 @@ pandemonium_int GDAPI pandemonium_array_bsearch_custom(pandemonium_array *p_self
void GDAPI pandemonium_array_invert(pandemonium_array *p_self); void GDAPI pandemonium_array_invert(pandemonium_array *p_self);
//int find(const Variant &p_value, int p_from = 0) const; p_from version pandemonium_int GDAPI pandemonium_array_find(const pandemonium_array *p_self, const pandemonium_variant *p_what);
pandemonium_int GDAPI pandemonium_array_find(const pandemonium_array *p_self, const pandemonium_variant *p_what, const pandemonium_int p_from); pandemonium_int GDAPI pandemonium_array_find_from(const pandemonium_array *p_self, const pandemonium_variant *p_what, const pandemonium_int p_from);
//int rfind(const Variant &p_value, int p_from = -1) const; p_from version pandemonium_int GDAPI pandemonium_array_rfind(const pandemonium_array *p_self, const pandemonium_variant *p_what);
pandemonium_int GDAPI pandemonium_array_rfind(const pandemonium_array *p_self, const pandemonium_variant *p_what, const pandemonium_int p_from); pandemonium_int GDAPI pandemonium_array_rfind_from(const pandemonium_array *p_self, const pandemonium_variant *p_what, const pandemonium_int p_from);
pandemonium_int GDAPI pandemonium_array_find_last(const pandemonium_array *p_self, const pandemonium_variant *p_what); pandemonium_int GDAPI pandemonium_array_find_last(const pandemonium_array *p_self, const pandemonium_variant *p_what);
pandemonium_int GDAPI pandemonium_array_count(const pandemonium_array *p_self, const pandemonium_variant *p_value); pandemonium_int GDAPI pandemonium_array_count(const pandemonium_array *p_self, const pandemonium_variant *p_value);
pandemonium_bool GDAPI pandemonium_array_has(const pandemonium_array *p_self, const pandemonium_variant *p_value); pandemonium_bool GDAPI pandemonium_array_has(const pandemonium_array *p_self, const pandemonium_variant *p_value);
@ -110,13 +111,14 @@ void GDAPI pandemonium_array_erase(pandemonium_array *p_self, const pandemonium_
void GDAPI pandemonium_array_push_front(pandemonium_array *p_self, const pandemonium_variant *p_value); void GDAPI pandemonium_array_push_front(pandemonium_array *p_self, const pandemonium_variant *p_value);
pandemonium_variant GDAPI pandemonium_array_pop_back(pandemonium_array *p_self); pandemonium_variant GDAPI pandemonium_array_pop_back(pandemonium_array *p_self);
pandemonium_variant GDAPI pandemonium_array_pop_front(pandemonium_array *p_self); pandemonium_variant GDAPI pandemonium_array_pop_front(pandemonium_array *p_self);
//Variant pop_at(int p_pos); pandemonium_variant GDAPI pandemonium_array_pop_at(pandemonium_array *p_self, pandemonium_int p_pos);
//Array duplicate(bool p_deep = false) const; deep variant pandemonium_array GDAPI pandemonium_array_duplicate(const pandemonium_array *p_self);
pandemonium_array GDAPI pandemonium_array_duplicate(const pandemonium_array *p_self, const pandemonium_bool p_deep); pandemonium_array GDAPI pandemonium_array_duplicate_deep(const pandemonium_array *p_self, const pandemonium_bool p_deep);
//Array slice(int p_begin, int p_end, int p_step = 1, bool p_deep = false) const; variants pandemonium_array GDAPI pandemonium_array_slice(const pandemonium_array *p_self, const pandemonium_int p_begin, const pandemonium_int p_end);
pandemonium_array GDAPI pandemonium_array_slice(const pandemonium_array *p_self, const pandemonium_int p_begin, const pandemonium_int p_end, const pandemonium_int p_step, const pandemonium_bool p_deep); pandemonium_array GDAPI pandemonium_array_slice_step(const pandemonium_array *p_self, const pandemonium_int p_begin, const pandemonium_int p_end, const pandemonium_int p_step);
pandemonium_array GDAPI pandemonium_array_slice_step_deep(const pandemonium_array *p_self, const pandemonium_int p_begin, const pandemonium_int p_end, const pandemonium_int p_step, const pandemonium_bool p_deep);
pandemonium_variant GDAPI pandemonium_array_min(const pandemonium_array *p_self); pandemonium_variant GDAPI pandemonium_array_min(const pandemonium_array *p_self);
pandemonium_variant GDAPI pandemonium_array_max(const pandemonium_array *p_self); pandemonium_variant GDAPI pandemonium_array_max(const pandemonium_array *p_self);

View File

@ -69,8 +69,8 @@ pandemonium_variant GDAPI pandemonium_dictionary_get_with_default(const pandemon
pandemonium_int GDAPI pandemonium_dictionary_size(const pandemonium_dictionary *p_self); pandemonium_int GDAPI pandemonium_dictionary_size(const pandemonium_dictionary *p_self);
pandemonium_bool GDAPI pandemonium_dictionary_empty(const pandemonium_dictionary *p_self); pandemonium_bool GDAPI pandemonium_dictionary_empty(const pandemonium_dictionary *p_self);
void GDAPI pandemonium_dictionary_clear(pandemonium_dictionary *p_self); void GDAPI pandemonium_dictionary_clear(pandemonium_dictionary *p_self);
//void merge(const Dictionary &p_dictionary, bool p_overwrite = false); p_overwrite false version void GDAPI pandemonium_dictionary_merge(pandemonium_dictionary *p_self, const pandemonium_dictionary *p_dictionary);
void GDAPI pandemonium_dictionary_merge(pandemonium_dictionary *p_self, const pandemonium_dictionary *p_dictionary, const pandemonium_bool p_overwrite); void GDAPI pandemonium_dictionary_merge_overwrite(pandemonium_dictionary *p_self, const pandemonium_dictionary *p_dictionary, const pandemonium_bool p_overwrite);
pandemonium_bool GDAPI pandemonium_dictionary_has(const pandemonium_dictionary *p_self, const pandemonium_variant *p_key); pandemonium_bool GDAPI pandemonium_dictionary_has(const pandemonium_dictionary *p_self, const pandemonium_variant *p_key);
pandemonium_bool GDAPI pandemonium_dictionary_has_all(const pandemonium_dictionary *p_self, const pandemonium_array *p_keys); pandemonium_bool GDAPI pandemonium_dictionary_has_all(const pandemonium_dictionary *p_self, const pandemonium_array *p_keys);
@ -78,7 +78,8 @@ pandemonium_bool GDAPI pandemonium_dictionary_has_all(const pandemonium_dictiona
void GDAPI pandemonium_dictionary_erase(pandemonium_dictionary *p_self, const pandemonium_variant *p_key); void GDAPI pandemonium_dictionary_erase(pandemonium_dictionary *p_self, const pandemonium_variant *p_key);
pandemonium_bool GDAPI pandemonium_dictionary_erase_with_return(pandemonium_dictionary *p_self, const pandemonium_variant *p_key); pandemonium_bool GDAPI pandemonium_dictionary_erase_with_return(pandemonium_dictionary *p_self, const pandemonium_variant *p_key);
//bool deep_equal(const Dictionary &p_dictionary, int p_recursion_count = 0) const; pandemonium_bool GDAPI pandemonium_dictionary_deep_equal(const pandemonium_dictionary *p_self, const pandemonium_dictionary *p_dictionary);
pandemonium_bool GDAPI pandemonium_dictionary_deep_equal_recursion_count(const pandemonium_dictionary *p_self, const pandemonium_dictionary *p_dictionary, pandemonium_int p_recursion_count);
pandemonium_bool GDAPI pandemonium_dictionary_operator_equal(const pandemonium_dictionary *p_self, const pandemonium_dictionary *p_b); pandemonium_bool GDAPI pandemonium_dictionary_operator_equal(const pandemonium_dictionary *p_self, const pandemonium_dictionary *p_b);
pandemonium_int GDAPI pandemonium_dictionary_hash(const pandemonium_dictionary *p_self); pandemonium_int GDAPI pandemonium_dictionary_hash(const pandemonium_dictionary *p_self);

View File

@ -53,12 +53,13 @@ typedef struct {
#include <gdn/gdnative.h> #include <gdn/gdnative.h>
#include <gdn/string.h> #include <gdn/string.h>
#include <gdn/string_name.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
//_FORCE_INLINE_ StringName get_sname() const { pandemonium_string_name GDAPI pandemonium_node_path_get_sname(const pandemonium_node_path *p_self);
pandemonium_bool GDAPI pandemonium_node_path_is_absolute(const pandemonium_node_path *p_self); pandemonium_bool GDAPI pandemonium_node_path_is_absolute(const pandemonium_node_path *p_self);
pandemonium_int GDAPI pandemonium_node_path_get_name_count(const pandemonium_node_path *p_self); pandemonium_int GDAPI pandemonium_node_path_get_name_count(const pandemonium_node_path *p_self);
@ -69,20 +70,20 @@ pandemonium_string GDAPI pandemonium_node_path_get_subname(const pandemonium_nod
//Vector<StringName> get_subnames() const; //Vector<StringName> get_subnames() const;
pandemonium_string GDAPI pandemonium_node_path_get_concatenated_subnames(const pandemonium_node_path *p_self); pandemonium_string GDAPI pandemonium_node_path_get_concatenated_subnames(const pandemonium_node_path *p_self);
//NodePath rel_path_to(const NodePath &p_np) const; pandemonium_node_path GDAPI pandemonium_node_path_rel_path_to(const pandemonium_node_path *p_self, const pandemonium_node_path *p_np);
pandemonium_node_path pandemonium_node_path_get_as_property_path(const pandemonium_node_path *p_self); pandemonium_node_path pandemonium_node_path_get_as_property_path(const pandemonium_node_path *p_self);
//void prepend_period(); void GDAPI pandemonium_node_path_prepend_period(pandemonium_node_path *p_self);
//_FORCE_INLINE_ uint32_t hash() const { pandemonium_int GDAPI pandemonium_node_path_hash(const pandemonium_node_path *p_self);
pandemonium_string GDAPI pandemonium_node_path_as_string(const pandemonium_node_path *p_self); pandemonium_string GDAPI pandemonium_node_path_as_string(const pandemonium_node_path *p_self);
pandemonium_bool GDAPI pandemonium_node_path_is_empty(const pandemonium_node_path *p_self); pandemonium_bool GDAPI pandemonium_node_path_is_empty(const pandemonium_node_path *p_self);
pandemonium_bool GDAPI pandemonium_node_path_operator_equal(const pandemonium_node_path *p_self, const pandemonium_node_path *p_b); pandemonium_bool GDAPI pandemonium_node_path_operator_equal(const pandemonium_node_path *p_self, const pandemonium_node_path *p_b);
//void simplify(); void GDAPI pandemonium_node_path_simplify(pandemonium_node_path *p_self);
//NodePath simplified() const; pandemonium_node_path GDAPI pandemonium_node_path_simplified(const pandemonium_node_path *p_self);
//NodePath(const Vector<StringName> &p_path, bool p_absolute); //NodePath(const Vector<StringName> &p_path, bool p_absolute);
//NodePath(const Vector<StringName> &p_path, const Vector<StringName> &p_subpath, bool p_absolute); //NodePath(const Vector<StringName> &p_path, const Vector<StringName> &p_subpath, bool p_absolute);

View File

@ -64,12 +64,12 @@ void GDAPI pandemonium_plane_set_d(pandemonium_plane *p_self, const pandemonium_
void GDAPI pandemonium_plane_set_normal(pandemonium_plane *p_self, const pandemonium_vector3 *p_normal); void GDAPI pandemonium_plane_set_normal(pandemonium_plane *p_self, const pandemonium_vector3 *p_normal);
pandemonium_vector3 GDAPI pandemonium_plane_get_normal(const pandemonium_plane *p_self); pandemonium_vector3 GDAPI pandemonium_plane_get_normal(const pandemonium_plane *p_self);
//void normalize(); void GDAPI pandemonium_plane_normalize(pandemonium_plane *p_self);
pandemonium_plane GDAPI pandemonium_plane_normalized(const pandemonium_plane *p_self); pandemonium_plane GDAPI pandemonium_plane_normalized(const pandemonium_plane *p_self);
pandemonium_vector3 GDAPI pandemonium_plane_center(const pandemonium_plane *p_self); pandemonium_vector3 GDAPI pandemonium_plane_center(const pandemonium_plane *p_self);
pandemonium_vector3 GDAPI pandemonium_plane_get_any_point(const pandemonium_plane *p_self); pandemonium_vector3 GDAPI pandemonium_plane_get_any_point(const pandemonium_plane *p_self);
//Vector3 get_any_perpendicular_normal() const; pandemonium_vector3 GDAPI pandemonium_plane_get_any_perpendicular_normal(const pandemonium_plane *p_self);
pandemonium_bool GDAPI pandemonium_plane_is_point_over(const pandemonium_plane *p_self, const pandemonium_vector3 *p_point); pandemonium_bool GDAPI pandemonium_plane_is_point_over(const pandemonium_plane *p_self, const pandemonium_vector3 *p_point);
pandemonium_real GDAPI pandemonium_plane_distance_to(const pandemonium_plane *p_self, const pandemonium_vector3 *p_point); pandemonium_real GDAPI pandemonium_plane_distance_to(const pandemonium_plane *p_self, const pandemonium_vector3 *p_point);
@ -82,8 +82,8 @@ pandemonium_bool GDAPI pandemonium_plane_intersects_segment(const pandemonium_pl
pandemonium_vector3 GDAPI pandemonium_plane_project(const pandemonium_plane *p_self, const pandemonium_vector3 *p_point); pandemonium_vector3 GDAPI pandemonium_plane_project(const pandemonium_plane *p_self, const pandemonium_vector3 *p_point);
pandemonium_plane GDAPI pandemonium_plane_operator_neg(const pandemonium_plane *p_self); pandemonium_plane GDAPI pandemonium_plane_operator_neg(const pandemonium_plane *p_self);
//bool is_equal_approx(const Plane &p_plane) const; pandemonium_bool GDAPI pandemonium_plane_is_equal_approx(const pandemonium_plane *p_self, const pandemonium_plane *p_plane);
//bool is_equal_approx_any_side(const Plane &p_plane) const; pandemonium_bool GDAPI pandemonium_plane_is_equal_approx_any_side(const pandemonium_plane *p_self, const pandemonium_plane *p_plane);
pandemonium_bool GDAPI pandemonium_plane_operator_equal(const pandemonium_plane *p_self, const pandemonium_plane *p_b); pandemonium_bool GDAPI pandemonium_plane_operator_equal(const pandemonium_plane *p_self, const pandemonium_plane *p_b);