diff options
| author | lupoDharkael <izhe@hotmail.es> | 2019-05-22 11:06:01 +0200 |
|---|---|---|
| committer | lupoDharkael <izhe@hotmail.es> | 2019-08-05 00:23:42 +0200 |
| commit | b895d3c3264dd52312e65af01e34ed04bbf86222 (patch) | |
| tree | 986d39e1ff65c0b2b4aa1f43c7675bea96ec9087 /include | |
| parent | bcc39bbf4bf9922c1a5eaea91885eda05cd1202c (diff) | |
| download | redot-cpp-b895d3c3264dd52312e65af01e34ed04bbf86222.tar.gz | |
Add missing class methods
Diffstat (limited to 'include')
| -rw-r--r-- | include/core/Array.hpp | 13 | ||||
| -rw-r--r-- | include/core/Basis.hpp | 2 | ||||
| -rw-r--r-- | include/core/Color.hpp | 24 | ||||
| -rw-r--r-- | include/core/GodotGlobal.hpp | 1 | ||||
| -rw-r--r-- | include/core/NodePath.hpp | 4 | ||||
| -rw-r--r-- | include/core/Quat.hpp | 4 | ||||
| -rw-r--r-- | include/core/String.hpp | 5 |
7 files changed, 53 insertions, 0 deletions
diff --git a/include/core/Array.hpp b/include/core/Array.hpp index 988d4c7..9cb0c12 100644 --- a/include/core/Array.hpp +++ b/include/core/Array.hpp @@ -98,6 +98,19 @@ public: void sort_custom(Object *obj, const String &func); + int bsearch(const Variant &value, const bool before = true); + + int bsearch_custom(const Variant &value, const Object *obj, + const String &func, const bool before = true); + + Array duplicate(const bool deep = false) const; + + Variant max() const; + + Variant min() const; + + void shuffle(); + ~Array(); }; diff --git a/include/core/Basis.hpp b/include/core/Basis.hpp index 3ea9c5d..24de0f0 100644 --- a/include/core/Basis.hpp +++ b/include/core/Basis.hpp @@ -59,6 +59,8 @@ public: Vector3 get_scale() const; + Basis slerp(Basis b, float t) const; + Vector3 get_euler_xyz() const; void set_euler_xyz(const Vector3 &p_euler); Vector3 get_euler_yxz() const; diff --git a/include/core/Color.hpp b/include/core/Color.hpp index 6d79cc1..0f93a55 100644 --- a/include/core/Color.hpp +++ b/include/core/Color.hpp @@ -32,8 +32,26 @@ public: uint32_t to_ARGB32() const; + uint32_t to_ABGR32() const; + + uint64_t to_ABGR64() const; + + uint64_t to_ARGB64() const; + + uint32_t to_RGBA32() const; + + uint64_t to_RGBA64() const; + float gray() const; + uint8_t get_r8() const; + + uint8_t get_g8() const; + + uint8_t get_b8() const; + + uint8_t get_a8() const; + float get_h() const; float get_s() const; @@ -42,6 +60,12 @@ public: void set_hsv(float p_h, float p_s, float p_v, float p_alpha = 1.0); + Color darkened(const float amount) const; + + Color lightened(const float amount) const; + + Color from_hsv(float p_h, float p_s, float p_v, float p_a = 1.0) const; + inline float &operator[](int idx) { return components[idx]; } diff --git a/include/core/GodotGlobal.hpp b/include/core/GodotGlobal.hpp index 71b3cf6..12f8801 100644 --- a/include/core/GodotGlobal.hpp +++ b/include/core/GodotGlobal.hpp @@ -8,6 +8,7 @@ namespace godot { extern "C" const godot_gdnative_core_api_struct *api; +extern "C" const godot_gdnative_core_1_1_api_struct *core_1_1_api; extern "C" const godot_gdnative_ext_nativescript_api_struct *nativescript_api; extern "C" const godot_gdnative_ext_nativescript_1_1_api_struct *nativescript_1_1_api; diff --git a/include/core/NodePath.hpp b/include/core/NodePath.hpp index aaa6727..221c5ce 100644 --- a/include/core/NodePath.hpp +++ b/include/core/NodePath.hpp @@ -31,6 +31,10 @@ public: bool is_empty() const; + NodePath get_as_property_path() const; + + String get_concatenated_subnames() const; + operator String() const; void operator=(const NodePath &other); diff --git a/include/core/Quat.hpp b/include/core/Quat.hpp index 314117d..f047178 100644 --- a/include/core/Quat.hpp +++ b/include/core/Quat.hpp @@ -20,6 +20,8 @@ public: Quat normalized() const; + bool is_normalized() const; + Quat inverse() const; void set_euler_xyz(const Vector3 &p_euler); @@ -40,6 +42,8 @@ public: void get_axis_and_angle(Vector3 &r_axis, real_t &r_angle) const; + void set_axis_angle(const Vector3 &axis, const float angle); + void operator*=(const Quat &q); Quat operator*(const Quat &q) const; diff --git a/include/core/String.hpp b/include/core/String.hpp index ff5d723..d448567 100644 --- a/include/core/String.hpp +++ b/include/core/String.hpp @@ -132,6 +132,11 @@ public: signed char casecmp_to(String p_str) const; signed char nocasecmp_to(String p_str) const; signed char naturalnocasecmp_to(String p_str) const; + String dedent() const; + PoolStringArray rsplit(const String &divisor, const bool allow_empty = true, const int maxsplit = 0) const; + String rstrip(const String &chars) const; + String trim_prefix(const String &prefix) const; + String trim_suffix(const String &suffix) const; }; String operator+(const char *a, const String &b); |
