summaryrefslogtreecommitdiff
path: root/modules/gltf/extensions/gltf_light.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gltf/extensions/gltf_light.h')
-rw-r--r--modules/gltf/extensions/gltf_light.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gltf/extensions/gltf_light.h b/modules/gltf/extensions/gltf_light.h
index 58fa299dfd..04980e144c 100644
--- a/modules/gltf/extensions/gltf_light.h
+++ b/modules/gltf/extensions/gltf_light.h
@@ -35,6 +35,8 @@
#include "core/io/resource.h"
#include "scene/3d/light_3d.h"
+// https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual
+
class GLTFLight : public Resource {
GDCLASS(GLTFLight, Resource)
friend class GLTFDocument;
@@ -68,6 +70,12 @@ public:
float get_outer_cone_angle();
void set_outer_cone_angle(float p_outer_cone_angle);
+
+ static Ref<GLTFLight> from_node(const Light3D *p_light);
+ Light3D *to_node() const;
+
+ static Ref<GLTFLight> from_dictionary(const Dictionary p_dictionary);
+ Dictionary to_dictionary() const;
};
#endif // GLTF_LIGHT_H