summaryrefslogtreecommitdiff
path: root/doc/classes/SurfaceTool.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/SurfaceTool.xml')
-rw-r--r--doc/classes/SurfaceTool.xml35
1 files changed, 18 insertions, 17 deletions
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 51c9e59fd2..9d73e9fb39 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -86,7 +86,7 @@
<param index="1" name="flags" type="int" default="0" />
<description>
Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh].
- [b]FIXME:[/b] Document possible values for [code]flags[/code], it changed in 4.0. Likely some combinations of [enum Mesh.ArrayFormat].
+ [b]FIXME:[/b] Document possible values for [param flags], it changed in 4.0. Likely some combinations of [enum Mesh.ArrayFormat].
</description>
</method>
<method name="commit_to_arrays">
@@ -123,7 +123,7 @@
<param index="0" name="nd_threshold" type="float" />
<param index="1" name="target_index_count" type="int" default="3" />
<description>
- Generates a LOD for a given [code]nd_threshold[/code] in linear units (square root of quadric error metric), using at most [code]target_index_count[/code] indices.
+ Generates a LOD for a given [param nd_threshold] in linear units (square root of quadric error metric), using at most [param target_index_count] indices.
Deprecated. Unused internally and neglects to preserve normals or UVs. Consider using [method ImporterMesh.generate_lods] instead.
</description>
</method>
@@ -131,8 +131,9 @@
<return type="void" />
<param index="0" name="flip" type="bool" default="false" />
<description>
- Generates normals from vertices so you do not have to do it manually. If [code]flip[/code] is [code]true[/code], the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays]. For correct display of normal-mapped surfaces, you will also have to generate tangents using [method generate_tangents].
+ Generates normals from vertices so you do not have to do it manually. If [param flip] is [code]true[/code], the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays]. For correct display of normal-mapped surfaces, you will also have to generate tangents using [method generate_tangents].
[b]Note:[/b] [method generate_normals] only works if the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES].
+ [b]Note:[/b] [method generate_normals] takes smooth groups into account. If you don't specify any smooth group for each vertex, [method generate_normals] will smooth normals for you.
</description>
</method>
<method name="generate_tangents">
@@ -151,7 +152,7 @@
<return type="int" enum="SurfaceTool.CustomFormat" />
<param index="0" name="channel_index" type="int" />
<description>
- Returns the format for custom [code]channel_index[/code] (currently up to 4). Returns [constant CUSTOM_MAX] if this custom channel is unused.
+ Returns the format for custom [param channel_index] (currently up to 4). Returns [constant CUSTOM_MAX] if this custom channel is unused.
</description>
</method>
<method name="get_primitive_type" qualifiers="const">
@@ -184,7 +185,7 @@
<return type="void" />
<param index="0" name="bones" type="PackedInt32Array" />
<description>
- Specifies an array of bones to use for the [i]next[/i] vertex. [code]bones[/code] must contain 4 integers.
+ Specifies an array of bones to use for the [i]next[/i] vertex. [param bones] must contain 4 integers.
</description>
</method>
<method name="set_color">
@@ -200,8 +201,8 @@
<param index="0" name="channel_index" type="int" />
<param index="1" name="custom_color" type="Color" />
<description>
- Sets the custom value on this vertex for [code]channel_index[/code].
- [method set_custom_format] must be called first for this [code]channel_index[/code]. Formats which are not RGBA will ignore other color channels.
+ Sets the custom value on this vertex for [param channel_index].
+ [method set_custom_format] must be called first for this [param channel_index]. Formats which are not RGBA will ignore other color channels.
</description>
</method>
<method name="set_custom_format">
@@ -209,7 +210,7 @@
<param index="0" name="channel_index" type="int" />
<param index="1" name="format" type="int" enum="SurfaceTool.CustomFormat" />
<description>
- Sets the color format for this custom [code]channel_index[/code]. Use [constant CUSTOM_MAX] to disable.
+ Sets the color format for this custom [param channel_index]. Use [constant CUSTOM_MAX] to disable.
Must be invoked after [method begin] and should be set before [method commit] or [method commit_to_arrays].
</description>
</method>
@@ -268,34 +269,34 @@
<return type="void" />
<param index="0" name="weights" type="PackedFloat32Array" />
<description>
- Specifies weight values to use for the [i]next[/i] vertex. [code]weights[/code] must contain 4 values. 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.
+ Specifies weight values to use for the [i]next[/i] vertex. [param weights] must contain 4 values. 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.
</description>
</method>
</methods>
<constants>
<constant name="CUSTOM_RGBA8_UNORM" value="0" enum="CustomFormat">
- Limits range of data passed to `set_custom` to unsigned normalized 0 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_UNORM].
+ Limits range of data passed to [method set_custom] to unsigned normalized 0 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_UNORM].
</constant>
<constant name="CUSTOM_RGBA8_SNORM" value="1" enum="CustomFormat">
- Limits range of data passed to `set_custom` to signed normalized -1 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_SNORM].
+ Limits range of data passed to [method set_custom] to signed normalized -1 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_SNORM].
</constant>
<constant name="CUSTOM_RG_HALF" value="2" enum="CustomFormat">
- Stores data passed to `set_custom` as half precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_HALF].
+ Stores data passed to [method set_custom] as half precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_HALF].
</constant>
<constant name="CUSTOM_RGBA_HALF" value="3" enum="CustomFormat">
- Stores data passed to `set_custom` as half precision floats and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_HALF].
+ Stores data passed to [method set_custom] as half precision floats and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_HALF].
</constant>
<constant name="CUSTOM_R_FLOAT" value="4" enum="CustomFormat">
- Stores data passed to `set_custom` as full precision floats, and uses only red color channel. See [constant Mesh.ARRAY_CUSTOM_R_FLOAT].
+ Stores data passed to [method set_custom] as full precision floats, and uses only red color channel. See [constant Mesh.ARRAY_CUSTOM_R_FLOAT].
</constant>
<constant name="CUSTOM_RG_FLOAT" value="5" enum="CustomFormat">
- Stores data passed to `set_custom` as full precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_FLOAT].
+ Stores data passed to [method set_custom] as full precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_FLOAT].
</constant>
<constant name="CUSTOM_RGB_FLOAT" value="6" enum="CustomFormat">
- Stores data passed to `set_custom` as full precision floats, and uses only red, green and blue color channels. See [constant Mesh.ARRAY_CUSTOM_RGB_FLOAT].
+ Stores data passed to [method set_custom] as full precision floats, and uses only red, green and blue color channels. See [constant Mesh.ARRAY_CUSTOM_RGB_FLOAT].
</constant>
<constant name="CUSTOM_RGBA_FLOAT" value="7" enum="CustomFormat">
- Stores data passed to `set_custom` as full precision floats, and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_FLOAT].
+ Stores data passed to [method set_custom] as full precision floats, and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_FLOAT].
</constant>
<constant name="CUSTOM_MAX" value="8" enum="CustomFormat">
Used to indicate a disabled custom channel.