summaryrefslogtreecommitdiff
path: root/doc/classes/MultiMesh.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/MultiMesh.xml')
-rw-r--r--doc/classes/MultiMesh.xml28
1 files changed, 21 insertions, 7 deletions
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index 885fcf259f..0784fc3a42 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -12,14 +12,12 @@
<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">
</return>
<description>
- Return the visibility AABB.
+ Returns the visibility AABB.
</description>
</method>
<method name="get_instance_color" qualifiers="const">
@@ -37,7 +35,7 @@
<argument index="0" name="instance" type="int">
</argument>
<description>
- Return the custom data that has been set for a specific instance.
+ Returns the custom data that has been set for a specific instance.
</description>
</method>
<method name="get_instance_transform" qualifiers="const">
@@ -46,7 +44,7 @@
<argument index="0" name="instance" type="int">
</argument>
<description>
- Return the transform of a specific instance.
+ Returns 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>
+ Returns the [Transform2D] of a specific instance.
+ </description>
+ </method>
+ <method name="set_as_bulk_array">
+ <return type="void">
+ </return>
+ <argument index="0" name="array" 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">
@@ -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">