You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add note for some usages of Plane in APIs
Some old APIs that may expect a Vector4 instead require a Plane: this is pretty confusing especially with tangents as one could interpret the API as wanting a value directly representing the tangent plane when in reality the Plane type is just used to carry one Vector3 and one extra sign component. This commit attempts to clear any potential confusion by adding a note to the APIs using Planes in such a way.
This commit is contained in:
@@ -83,6 +83,7 @@
|
||||
<param index="0" name="tangent" type="Plane" />
|
||||
<description>
|
||||
Set the tangent attribute that will be pushed with the next vertex.
|
||||
[b]Note:[/b] Even though [param tangent] is a [Plane], it does not directly represent the tangent plane. Its [member Plane.x], [member Plane.y], and [member Plane.z] represent the tangent vector and [member Plane.d] should be either [code]-1[/code] or [code]1[/code]. See also [constant Mesh.ARRAY_TANGENT].
|
||||
</description>
|
||||
</method>
|
||||
<method name="surface_set_uv">
|
||||
|
||||
@@ -318,6 +318,7 @@
|
||||
<param index="1" name="tangent" type="Plane" />
|
||||
<description>
|
||||
Sets the tangent of the given vertex.
|
||||
[b]Note:[/b] Even though [param tangent] is a [Plane], it does not directly represent the tangent plane. Its [member Plane.x], [member Plane.y], and [member Plane.z] represent the tangent vector and [member Plane.d] should be either [code]-1[/code] or [code]1[/code]. See also [constant Mesh.ARRAY_TANGENT].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_vertex_uv">
|
||||
|
||||
@@ -258,6 +258,7 @@
|
||||
<param index="0" name="tangent" type="Plane" />
|
||||
<description>
|
||||
Specifies a tangent to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
|
||||
[b]Note:[/b] Even though [param tangent] is a [Plane], it does not directly represent the tangent plane. Its [member Plane.x], [member Plane.y], and [member Plane.z] represent the tangent vector and [member Plane.d] should be either [code]-1[/code] or [code]1[/code]. See also [constant Mesh.ARRAY_TANGENT].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_uv">
|
||||
|
||||
Reference in New Issue
Block a user