From ef45f5ce757719ef919e14b2a051fe6d620ab974 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 --- 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 745d803a30b..d44e3c54c9a 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 [ArrayMesh] 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. @@ -176,6 +178,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. @@ -183,7 +186,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 c5c15e0ddcf..f5868f51cbf 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 d18ba96a951..39a733fdb33 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/latest/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 c9c3643edb7..2214357308c 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 779ce111801..cf7e56f895a 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 9600a1d196e..2125aa5e174 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.