Mesh

A Resource that contains vertex array-based geometry.

Mesh is a type of Resource that contains vertex array-based geometry, divided in surfaces. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

ArrayFormat
enum ArrayFormat
ArrayType
enum ArrayType
BlendShapeMode
enum BlendShapeMode
Constants
enum Constants
PrimitiveType
enum PrimitiveType

Functions

createConvexShape
Ref!Shape createConvexShape()

Calculate a ConvexPolygonShape from the mesh.

createOutline
Ref!Mesh createOutline(double margin)

Calculate an outline mesh at a defined offset (margin) from the original mesh. Note: This method typically returns the vertices in reverse order (e.g. clockwise to counterclockwise).

createTrimeshShape
Ref!Shape createTrimeshShape()

Calculate a ConcavePolygonShape from the mesh.

generateTriangleMesh
Ref!TriangleMesh generateTriangleMesh()

Generate a TriangleMesh from the mesh.

getAabb
AABB getAabb()

Returns the smallest AABB enclosing this mesh in local space. Not affected by custom_aabb. See also VisualInstance.getTransformedAabb. Note: This is only implemented for ArrayMesh and PrimitiveMesh.

getFaces
PoolVector3Array getFaces()

Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle.

getLightmapSizeHint
Vector2 getLightmapSizeHint()
getSurfaceCount
long getSurfaceCount()

Returns the amount of surfaces that the Mesh holds.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(Mesh other)
opEquals
bool opEquals(typeof(null) n)
setLightmapSizeHint
void setLightmapSizeHint(Vector2 size)
surfaceGetArrays
Array surfaceGetArrays(long surf_idx)

Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface (see ArrayMesh.addSurfaceFromArrays).

surfaceGetBlendShapeArrays
Array surfaceGetBlendShapeArrays(long surf_idx)

Returns the blend shape arrays for the requested surface.

surfaceGetMaterial
Ref!Material surfaceGetMaterial(long surf_idx)

Returns a Material in a given surface. Surface is rendered using this material.

surfaceSetMaterial
void surfaceSetMaterial(long surf_idx, Material material)

Sets a Material for a given surface. Surface will be rendered using this material.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

lightmapSizeHint
Vector2 lightmapSizeHint [@property getter]
Vector2 lightmapSizeHint [@property setter]

Sets a hint to be used for lightmap resolution in BakedLightmap. Overrides BakedLightmap.defaultTexelsPerUnit.

Static functions

_new
Mesh _new()

Construct a new instance of Mesh. Note: use memnew!Mesh instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta