diff options
Diffstat (limited to 'doc/classes/MultiMesh.xml')
-rw-r--r-- | doc/classes/MultiMesh.xml | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 9bee8e2100..0e6b5ef1cb 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="MultiMesh" inherits="Resource" category="Core" version="3.1"> +<class name="MultiMesh" inherits="Resource" category="Core" version="3.2"> <brief_description> Provides high performance mesh instancing. </brief_description> @@ -12,8 +12,6 @@ <tutorials> <link>http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link> </tutorials> - <demos> - </demos> <methods> <method name="get_aabb" qualifiers="const"> <return type="AABB"> @@ -46,7 +44,7 @@ <argument index="0" name="instance" type="int"> </argument> <description> - Return the transform of a specific instance. + Return the [Transform] of a specific instance. </description> </method> <method name="get_instance_transform_2d" qualifiers="const"> @@ -55,6 +53,18 @@ <argument index="0" name="instance" type="int"> </argument> <description> + Return the [Transform2D] of a specific instance. + </description> + </method> + <method name="set_as_bulk_array"> + <return type="void"> + </return> + <argument index="0" name="arg0" type="PoolRealArray"> + </argument> + <description> + Set all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative. + All data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc... + [Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, COLOR_8BIT / CUSTOM_DATA_8BIT is stored as 1 float (4 bytes as is) and COLOR_FLOAT / CUSTOM_DATA_FLOAT is stored as 4 floats. </description> </method> <method name="set_instance_color"> @@ -66,7 +76,7 @@ </argument> <description> Set the color of a specific instance. - For the color to take effect, ensure that [member color_format] is non-[code]null[/code] on the [code]MultiMesh[/code] and [member SpatialMaterial.vertex_color_use_as_albedo] is [code]true[/code] on the material. + For the color to take effect, ensure that [member color_format] is non-[code]null[/code] on the [MultiMesh] and [member SpatialMaterial.vertex_color_use_as_albedo] is [code]true[/code] on the material. </description> </method> <method name="set_instance_custom_data"> @@ -88,7 +98,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> - Set the transform for a specific instance. + Set the [Transform] for a specific instance. </description> </method> <method name="set_instance_transform_2d"> @@ -99,6 +109,7 @@ <argument index="1" name="transform" type="Transform2D"> </argument> <description> + Set the [Transform2D] for a specific instance. </description> </method> </methods> @@ -110,7 +121,7 @@ Format of custom data in custom data array that gets passed to shader. </member> <member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count"> - Number of instances that will get drawn. + Number of instances that will get drawn. This clears and (re)sizes the buffers. By default all instances are drawn but you can limit this with [member visible_instance_count]. </member> <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> Mesh to be drawn. @@ -118,6 +129,9 @@ <member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" enum="MultiMesh.TransformFormat"> Format of transform used to transform mesh, either 2D or 3D. </member> + <member name="visible_instance_count" type="int" setter="set_visible_instance_count" getter="get_visible_instance_count"> + Limits the number of instances drawn, -1 draws all instances. Changing this does not change the sizes of the buffers. + </member> </members> <constants> <constant name="TRANSFORM_2D" value="0" enum="TransformFormat"> |