From 2e58e3dbe8e64959fe3d8c2c46e105f1fb89321c Mon Sep 17 00:00:00 2001 From: clayjohn Date: Mon, 10 Jun 2019 13:38:00 -0700 Subject: [PATCH] filled out docs for various mesh types (cherry picked from commit ef45f5ce757719ef919e14b2a051fe6d620ab974) --- doc/classes/ArrayMesh.xml | 5 ++++- doc/classes/MeshInstance.xml | 1 + doc/classes/MeshInstance2D.xml | 5 +++++ doc/classes/PrimitiveMesh.xml | 5 ++++- doc/classes/QuadMesh.xml | 1 + doc/classes/TriangleMesh.xml | 2 ++ 6 files changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 391084194f2..c4fc4a6c05f 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -1,6 +1,7 @@ + [Mesh] type that provides utility for constructing a surface from arrays. The [code]ArrayMesh[/code] is used to construct a [Mesh] by specifying the attributes as arrays. The most basic example is the creation of a single triangle @@ -30,6 +31,7 @@ + Add name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added. @@ -187,6 +189,7 @@ + Updates a specified region of mesh arrays on GPU. Warning: only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments. @@ -194,7 +197,7 @@ - An overriding bounding box for this mesh. + Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected culling when using a shader to offset vertices. diff --git a/doc/classes/MeshInstance.xml b/doc/classes/MeshInstance.xml index 20505c23104..33efcc2b025 100644 --- a/doc/classes/MeshInstance.xml +++ b/doc/classes/MeshInstance.xml @@ -43,6 +43,7 @@ + Returns the number of surface materials. diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml index b9c4b089aac..05c22fea02d 100644 --- a/doc/classes/MeshInstance2D.xml +++ b/doc/classes/MeshInstance2D.xml @@ -1,8 +1,10 @@ + Node used for displaying a [Mesh] in 2D. + Node used for displaying a [Mesh] in 2D. Can be constructed from an existing [Sprite] use tool in Toolbar. Select "Sprite" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D". http://docs.godotengine.org/en/3.1/tutorials/2d/2d_meshes.html @@ -11,10 +13,13 @@ + The [Mesh] that will be drawn by the [MeshInstance2D]. + The normal map that will be used if using the default [CanvasItemMaterial]. + The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader. diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index b90e71c990f..5d759734a3e 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -4,7 +4,7 @@ Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. - Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. + Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. Examples include [CapsuleMesh], [CubeMesh], [CylinderMesh], [PlaneMesh], [PrismMesh], [QuadMesh], and [SphereMesh]. @@ -13,13 +13,16 @@ + Returns mesh arrays used to constitute surface of [Mesh]. Mesh array can be used with [ArrayMesh] to create new surface. + Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected culling when using a shader to offset vertices. + If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. Result is the same as using *CULL_BACK* in [SpatialMaterial]. Default is false. The current [Material] of the primitive mesh. diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml index 944cca5c39c..908664efcb3 100644 --- a/doc/classes/QuadMesh.xml +++ b/doc/classes/QuadMesh.xml @@ -12,6 +12,7 @@ + Size in the X and Y axes. Default is [code]Vector2(1, 1)[/code]. diff --git a/doc/classes/TriangleMesh.xml b/doc/classes/TriangleMesh.xml index bfe20c22046..314f6d3d7b3 100644 --- a/doc/classes/TriangleMesh.xml +++ b/doc/classes/TriangleMesh.xml @@ -1,8 +1,10 @@ + Internal mesh type. + Mesh type used internally for collision calculations.