diff options
author | Yuri Rubinsky <chaosus89@gmail.com> | 2022-08-24 11:19:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 11:19:41 +0300 |
commit | 0626ce50cfd35d1eb81c6c9627f8540be9636b4b (patch) | |
tree | 6aaefc206eab7ebfd23331ca7be6a81c6c86a6af | |
parent | 629949d0a506c11103203f2821834b81b7371a40 (diff) | |
parent | e97ece55aa29fe510938dab6af82ef5bb27912d0 (diff) | |
download | redot-engine-0626ce50cfd35d1eb81c6c9627f8540be9636b4b.tar.gz |
Merge pull request #64794 from Chaosus/projection_constructor
-rw-r--r-- | core/variant/variant_construct.cpp | 1 | ||||
-rw-r--r-- | doc/classes/Projection.xml | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/core/variant/variant_construct.cpp b/core/variant/variant_construct.cpp index 3a0b6c1bb9..d048f45737 100644 --- a/core/variant/variant_construct.cpp +++ b/core/variant/variant_construct.cpp @@ -162,6 +162,7 @@ void Variant::_register_variant_constructors() { add_constructor<VariantConstructNoArgs<Projection>>(sarray()); add_constructor<VariantConstructor<Projection, Projection>>(sarray("from")); add_constructor<VariantConstructor<Projection, Transform3D>>(sarray("from")); + add_constructor<VariantConstructor<Projection, Vector4, Vector4, Vector4, Vector4>>(sarray("x_axis", "y_axis", "z_axis", "w_axis")); add_constructor<VariantConstructNoArgs<Color>>(sarray()); add_constructor<VariantConstructor<Color, Color>>(sarray("from")); diff --git a/doc/classes/Projection.xml b/doc/classes/Projection.xml index b8f6e54d87..5690ea5e95 100644 --- a/doc/classes/Projection.xml +++ b/doc/classes/Projection.xml @@ -24,6 +24,16 @@ <description> </description> </constructor> + <constructor name="Projection"> + <return type="Projection" /> + <param index="0" name="x_axis" type="Vector4" /> + <param index="1" name="y_axis" type="Vector4" /> + <param index="2" name="z_axis" type="Vector4" /> + <param index="3" name="w_axis" type="Vector4" /> + <description> + Constructs a Projection from four [Vector4] values (matrix columns). + </description> + </constructor> </constructors> <methods> <method name="create_depth_correction" qualifiers="static"> |