filled out docs for various mesh types
(cherry picked from commit ef45f5ce75
)
This commit is contained in:
parent
efee888a6e
commit
2e58e3dbe8
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.1.2">
|
<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.1.2">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
|
[Mesh] type that provides utility for constructing a surface from arrays.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
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
|
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 @@
|
||||||
<argument index="0" name="name" type="String">
|
<argument index="0" name="name" type="String">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<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>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="add_surface_from_arrays">
|
<method name="add_surface_from_arrays">
|
||||||
|
@ -187,6 +189,7 @@
|
||||||
<argument index="2" name="data" type="PoolByteArray">
|
<argument index="2" name="data" type="PoolByteArray">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<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>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
@ -194,7 +197,7 @@
|
||||||
<member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode">
|
<member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode">
|
||||||
</member>
|
</member>
|
||||||
<member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb">
|
<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>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Returns the number of surface materials.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_surface_material">
|
<method name="set_surface_material">
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<class name="MeshInstance2D" inherits="Node2D" category="Core" version="3.1.2">
|
<class name="MeshInstance2D" inherits="Node2D" category="Core" version="3.1.2">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
|
Node used for displaying a [Mesh] in 2D.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<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>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
<link>http://docs.godotengine.org/en/3.1/tutorials/2d/2d_meshes.html</link>
|
<link>http://docs.godotengine.org/en/3.1/tutorials/2d/2d_meshes.html</link>
|
||||||
|
@ -11,10 +13,13 @@
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
|
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
|
||||||
|
The [Mesh] that will be drawn by the [MeshInstance2D].
|
||||||
</member>
|
</member>
|
||||||
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
|
<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>
|
||||||
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
|
<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>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
|
|
|
@ -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.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<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>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
|
@ -13,13 +13,16 @@
|
||||||
<return type="Array">
|
<return type="Array">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Returns mesh arrays used to constitute surface of [Mesh]. Mesh array can be used with [ArrayMesh] to create new surface.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb">
|
<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>
|
||||||
<member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces">
|
<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>
|
||||||
<member name="material" type="Material" setter="set_material" getter="get_material">
|
<member name="material" type="Material" setter="set_material" getter="get_material">
|
||||||
The current [Material] of the primitive mesh.
|
The current [Material] of the primitive mesh.
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="size" type="Vector2" setter="set_size" getter="get_size">
|
<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>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<class name="TriangleMesh" inherits="Reference" category="Core" version="3.1.2">
|
<class name="TriangleMesh" inherits="Reference" category="Core" version="3.1.2">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
|
Internal mesh type.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
|
Mesh type used internally for collision calculations.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
|
|
Loading…
Reference in New Issue