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: Typically returns the vertices in reverse order (e.g. clockwise to anti-clockwise).

createTrimeshShape
Ref!Shape createTrimeshShape()

Calculate a ConcavePolygonShape from the mesh.

generateTriangleMesh
Ref!TriangleMesh generateTriangleMesh()

Generate a TriangleMesh from the mesh.

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()

Return the amount of surfaces that the Mesh holds.

opAssign
Mesh opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Mesh other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
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)

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

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

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

Static functions

_new
Mesh _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
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
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
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