summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorVolTer <mew.pur.pur@abv.bg>2023-04-26 11:58:13 +0200
committerYuri Sizov <yuris@humnom.net>2023-04-26 14:51:01 +0200
commit7f09c3d2fc40c96f38daa156364a20cf900ab201 (patch)
treedb1b822e959b71e2450c8156cd17e8db81730427 /doc/classes
parent56110a354cb53136eb584797608a3812fde6c818 (diff)
Provide an example on how to use ImmediateMesh
(cherry picked from commit 4eabad6c265c0c068b5ab2c26e911ac99cd03c3b)
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Expression.xml1
-rw-r--r--doc/classes/ImmediateMesh.xml13
2 files changed, 13 insertions, 1 deletions
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml
index 2451ab1a0d..2c0e6b49b2 100644
--- a/doc/classes/Expression.xml
+++ b/doc/classes/Expression.xml
@@ -49,6 +49,7 @@
[/codeblocks]
</description>
<tutorials>
+ <link title="Evaluating Expressions">$DOCS_URL/tutorials/scripting/evaluating_expressions.html</link>
</tutorials>
<methods>
<method name="execute">
diff --git a/doc/classes/ImmediateMesh.xml b/doc/classes/ImmediateMesh.xml
index a6d2e3e249..81fd62f85f 100644
--- a/doc/classes/ImmediateMesh.xml
+++ b/doc/classes/ImmediateMesh.xml
@@ -4,9 +4,20 @@
Mesh optimized for creating geometry manually.
</brief_description>
<description>
- Mesh optimized for creating geometry manually, similar to OpenGL1.x immediate mode.
+ A mesh type optimized for creating geometry manually, similar to OpenGL 1.x immediate mode.
+ Here's a sample on how to generate a triangular face:
+ [codeblocks]
+ var mesh = ImmediateMesh.new()
+ mesh.surface_begin(Mesh.PRIMITIVE_TRIANGLES)
+ mesh.surface_add_vertex(Vector3.LEFT)
+ mesh.surface_add_vertex(Vector3.FORWARD)
+ mesh.surface_add_vertex(Vector3.ZERO)
+ mesh.surface_end()
+ [/codeblocks]
+ [b]Note:[/b] Generating complex geometries with [ImmediateMesh] is highly inefficient. Instead, it is designed to generate simple geometry that changes often.
</description>
<tutorials>
+ <link title="Using ImmediateMesh">$DOCS_URL/tutorials/3d/procedural_geometry/immediatemesh.html</link>
</tutorials>
<methods>
<method name="clear_surfaces">