From 455c06ecd466424cdf1b444a7c289b322390e795 Mon Sep 17 00:00:00 2001 From: reduz Date: Wed, 20 Jul 2022 01:11:13 +0200 Subject: Implement Vector4, Vector4i, Projection Implement built-in classes Vector4, Vector4i and Projection. * Two versions of Vector4 (float and integer). * A Projection class, which is a 4x4 matrix specialized in projection types. These types have been requested for a long time, but given they were very corner case they were not added before. Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity. **Q**: Why Projection and not Matrix4? **A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming. --- doc/classes/@GlobalScope.xml | 54 +++++---- doc/classes/Camera3D.xml | 8 +- doc/classes/Label.xml | 1 - doc/classes/LabelSettings.xml | 10 -- doc/classes/Projection.xml | 273 ++++++++++++++++++++++++++++++++++++++++++ doc/classes/Transform3D.xml | 6 + doc/classes/Vector4.xml | 231 +++++++++++++++++++++++++++++++++++ doc/classes/Vector4i.xml | 208 ++++++++++++++++++++++++++++++++ doc/classes/float.xml | 12 ++ doc/classes/int.xml | 12 ++ 10 files changed, 776 insertions(+), 39 deletions(-) create mode 100644 doc/classes/Projection.xml create mode 100644 doc/classes/Vector4.xml create mode 100644 doc/classes/Vector4i.xml (limited to 'doc/classes') diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index fbeda641ad..30a2228294 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2782,76 +2782,82 @@ Variable is of type [Transform2D]. - + + + + + Variable is of type [Plane]. - + Variable is of type [Quaternion]. - + Variable is of type [AABB]. - + Variable is of type [Basis]. - + Variable is of type [Transform3D]. - + + + Variable is of type [Color]. - + Variable is of type [StringName]. - + Variable is of type [NodePath]. - + Variable is of type [RID]. - + Variable is of type [Object]. - + Variable is of type [Callable]. - + Variable is of type [Signal]. - + Variable is of type [Dictionary]. - + Variable is of type [Array]. - + Variable is of type [PackedByteArray]. - + Variable is of type [PackedInt32Array]. - + Variable is of type [PackedInt64Array]. - + Variable is of type [PackedFloat32Array]. - + Variable is of type [PackedFloat64Array]. - + Variable is of type [PackedStringArray]. - + Variable is of type [PackedVector2Array]. - + Variable is of type [PackedVector3Array]. - + Variable is of type [PackedColorArray]. - + Represents the size of the [enum Variant.Type] enum. diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index 468fddcfc1..3aedbbd1e6 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -189,7 +189,7 @@ The distance to the near culling boundary for this camera relative to its local Z axis. - + The camera's projection mode. In [constant PROJECTION_PERSPECTIVE] mode, objects' Z distance from the camera's local space scales their perceived size. @@ -200,13 +200,13 @@ - + Perspective projection. Objects on the screen becomes smaller when they are far away. - + Orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. - + Frustum projection. This mode allows adjusting [member frustum_offset] to create "tilted frustum" effects. diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 8448109f02..1ebf770f7e 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -50,7 +50,6 @@ Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants. - Resource to override [Theme] font, outline and shadow properties. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. diff --git a/doc/classes/LabelSettings.xml b/doc/classes/LabelSettings.xml index 5f7427f4aa..227313d3b3 100644 --- a/doc/classes/LabelSettings.xml +++ b/doc/classes/LabelSettings.xml @@ -1,7 +1,6 @@ - Resource to override [Theme] font, outline and shadow properties of the [Label]. @@ -9,31 +8,22 @@ - [Font] of the [Label]'s text. - Default text [Color] of the [Label]. - Font size of the [Label]'s text. - Vertical space between lines in multiline text. - The tint of text outline. - Text outline size. - The tint of text shadow. - The offset of the text's shadow. - The size of the text's shadow. diff --git a/doc/classes/Projection.xml b/doc/classes/Projection.xml new file mode 100644 index 0000000000..115015c2d7 --- /dev/null +++ b/doc/classes/Projection.xml @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index afd11b6c77..147eba9f25 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -37,6 +37,12 @@ Constructs a Transform3D from a [Basis] and [Vector3]. + + + + + + diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml new file mode 100644 index 0000000000..e1175e57bd --- /dev/null +++ b/doc/classes/Vector4.xml @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml new file mode 100644 index 0000000000..c3114e20e2 --- /dev/null +++ b/doc/classes/Vector4i.xml @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/float.xml b/doc/classes/float.xml index f36b1fddeb..a7c6533ef5 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -110,6 +110,18 @@ [/codeblock] + + + + + + + + + + + + diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 2eceba40fa..6b492ca923 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -157,6 +157,18 @@ Multiplies each component of the [Vector3i] by the given [int]. + + + + + + + + + + + + -- cgit v1.2.3