PrimitiveMesh

Base class for all primitive meshes. Handles applying a Material to a primitive mesh.

Examples include CapsuleMesh, CubeMesh, CylinderMesh, PlaneMesh, PrismMesh, QuadMesh, and SphereMesh.

Members

Aliases

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

Functions

_update
void _update()
getCustomAabb
AABB getCustomAabb()
getFlipFaces
bool getFlipFaces()
getMaterial
Ref!Material getMaterial()
getMeshArrays
Array getMeshArrays()

Returns mesh arrays used to constitute surface of Mesh. The result can be passed to ArrayMesh.addSurfaceFromArrays to create a new surface. For example:

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(PrimitiveMesh other)
opEquals
bool opEquals(typeof(null) n)
setCustomAabb
void setCustomAabb(AABB aabb)
setFlipFaces
void setFlipFaces(bool flip_faces)
setMaterial
void setMaterial(Material material)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

customAabb
AABB customAabb [@property getter]
AABB customAabb [@property setter]

Overrides the AABB with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.

flipFaces
bool flipFaces [@property getter]
bool flipFaces [@property setter]

If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. This gives the same result as using constant SpatialMaterial.CULL_BACK in SpatialMaterial.paramsCullMode.

Static functions

_new
PrimitiveMesh _new()

Construct a new instance of PrimitiveMesh. Note: use memnew!PrimitiveMesh 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