소스 검색

Merge pull request #64794 from Chaosus/projection_constructor

Yuri Rubinsky 3 년 전
부모
커밋
0626ce50cf
2개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      core/variant/variant_construct.cpp
  2. 10 0
      doc/classes/Projection.xml

+ 1 - 0
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"));

+ 10 - 0
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">