Merge pull request #29658 from clayjohn/docs_mesh
Filled out docs for various mesh types
This commit is contained in:
commit
51ed803a11
6 changed files with 17 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.2">
|
||||
<brief_description>
|
||||
[Mesh] type that provides utility for constructing a surface from arrays.
|
||||
</brief_description>
|
||||
<description>
|
||||
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 @@
|
|||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<description>
|
||||
Add name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_surface_from_arrays">
|
||||
|
@ -176,6 +178,7 @@
|
|||
<argument index="2" name="data" type="PoolByteArray">
|
||||
</argument>
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
@ -183,7 +186,7 @@
|
|||
<member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode">
|
||||
</member>
|
||||
<member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb">
|
||||
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.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
<return type="int">
|
||||
</return>
|
||||
<description>
|
||||
Returns the number of surface materials.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_surface_material">
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="MeshInstance2D" inherits="Node2D" category="Core" version="3.2">
|
||||
<brief_description>
|
||||
Node used for displaying a [Mesh] in 2D.
|
||||
</brief_description>
|
||||
<description>
|
||||
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".
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>http://docs.godotengine.org/en/latest/tutorials/2d/2d_meshes.html</link>
|
||||
|
@ -11,10 +13,13 @@
|
|||
</methods>
|
||||
<members>
|
||||
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
|
||||
The [Mesh] that will be drawn by the [MeshInstance2D].
|
||||
</member>
|
||||
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
|
||||
The normal map that will be used if using the default [CanvasItemMaterial].
|
||||
</member>
|
||||
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
|
||||
The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh.
|
||||
</brief_description>
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
@ -13,13 +13,16 @@
|
|||
<return type="Array">
|
||||
</return>
|
||||
<description>
|
||||
Returns mesh arrays used to constitute surface of [Mesh]. Mesh array can be used with [ArrayMesh] to create new surface.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb">
|
||||
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.
|
||||
</member>
|
||||
<member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces">
|
||||
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.
|
||||
</member>
|
||||
<member name="material" type="Material" setter="set_material" getter="get_material">
|
||||
The current [Material] of the primitive mesh.
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</methods>
|
||||
<members>
|
||||
<member name="size" type="Vector2" setter="set_size" getter="get_size">
|
||||
Size in the X and Y axes. Default is [code]Vector2(1, 1)[/code].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="TriangleMesh" inherits="Reference" category="Core" version="3.2">
|
||||
<brief_description>
|
||||
Internal mesh type.
|
||||
</brief_description>
|
||||
<description>
|
||||
Mesh type used internally for collision calculations.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
|
Loading…
Reference in a new issue