summaryrefslogtreecommitdiff
path: root/modules/gltf/gltf_document.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gltf/gltf_document.h')
-rw-r--r--modules/gltf/gltf_document.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/modules/gltf/gltf_document.h b/modules/gltf/gltf_document.h
index 3e8ea19045..fb798a055a 100644
--- a/modules/gltf/gltf_document.h
+++ b/modules/gltf/gltf_document.h
@@ -44,6 +44,7 @@
#include "scene/resources/texture.h"
#include "modules/modules_enabled.gen.h"
+#include <cstdint>
class GLTFState;
class GLTFSkin;
@@ -102,6 +103,16 @@ public:
COMPONENT_TYPE_FLOAT = 5126,
};
+protected:
+ static void _bind_methods();
+
+public:
+ Node *import_scene(const String &p_path, uint32_t p_flags, int32_t p_bake_fps, Ref<GLTFState> r_state);
+ Node *import_scene_gltf(const String &p_path, uint32_t p_flags, int32_t p_bake_fps, Ref<GLTFState> r_state, List<String> *r_missing_deps, Error *r_err = nullptr);
+ Error save_scene(Node *p_node, const String &p_path,
+ const String &p_src_path, uint32_t p_flags,
+ float p_bake_fps, Ref<GLTFState> r_state);
+
private:
template <class T>
static Array to_array(const Vector<T> &p_inp) {
@@ -155,6 +166,7 @@ private:
r_out[keys[i]] = p_inp[keys[i]];
}
}
+ void _build_parent_hierachy(Ref<GLTFState> state);
double _filter_number(double p_float);
String _get_component_type_name(const uint32_t p_component);
int _get_component_type_size(const int component_type);
@@ -346,8 +358,8 @@ private:
Error _serialize_extensions(Ref<GLTFState> state) const;
public:
- // http://www.itu.int/rec/R-REC-BT.601
- // http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.601-7-201103-I!!PDF-E.pdf
+ // https://www.itu.int/rec/R-REC-BT.601
+ // https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.601-7-201103-I!!PDF-E.pdf
static constexpr float R_BRIGHTNESS_COEFF = 0.299f;
static constexpr float G_BRIGHTNESS_COEFF = 0.587f;
static constexpr float B_BRIGHTNESS_COEFF = 0.114f;