Enumerationmigueldeicaza.swiftgodot 0.46.0SwiftGodot
PrimitiveType
Mesh.swift:19enum PrimitiveType
Cases
case points
Render array as points (one vertex equals one point).
case lines
Render array as lines (every two vertices a line is created).
case lineStrip
Render array as line strip.
case triangles
Render array as triangles (every three vertices a triangle is created).
case triangleStrip
Render array as triangle strips.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (32) members.
Types
Type members
Instance members
var lightmapSizeHint: Vector2i
Sets a hint to be used for lightmap resolution.
func createConvexShape(clean: Bool, simplify: Bool
) -> ConvexPolygonShape3D? Calculate a
ConvexPolygonShape3D
from the mesh.func createOutline(margin: Double
) -> Mesh? Calculate an outline mesh at a defined offset (margin) from the original mesh.
func createPlaceholder(
) -> Resource? Creates a placeholder version of this resource (
PlaceholderMesh
).func createTrimeshShape(
) -> ConcavePolygonShape3D? Calculate a
ConcavePolygonShape3D
from the mesh.func generateTriangleMesh(
) -> TriangleMesh? Generate a
TriangleMesh
from the mesh. Considers only surfaces using one of these primitive types: .primitiveTriangles, .primitiveTriangleStrip.func getAabb(
) -> AABB Returns the smallest
AABB
enclosing this mesh in local space. Not affected bycustom_aabb
.func getFaces(
) -> PackedVector3Array Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle.
func getSurfaceCount(
) -> Int32 Returns the number of surfaces that the
Mesh
holds. This is equivalent togetSurfaceOverrideMaterialCount
.func surfaceGetArrays(surfIdx: Int32
) -> GArray Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface (see
addSurfaceFromArrays(primitive:arrays:blendShapes:lods:flags:)
).func surfaceGetBlendShapeArrays(surfIdx: Int32
) -> VariantCollection<GArray> Returns the blend shape arrays for the requested surface.
func surfaceGetMaterial(surfIdx: Int32
) -> Material? Returns a
Material
in a given surface. Surface is rendered using this material.func surfaceSetMaterial(surfIdx: Int32, material: Material?
) Sets a
Material
for a given surface. Surface will be rendered using this material.
Show implementation details (14)
Hide implementation details
func _getAabb(
) -> AABB Virtual method to override the
AABB
for a custom class extendingMesh
.func _getBlendShapeCount(
) -> Int32 Virtual method to override the number of blend shapes for a custom class extending
Mesh
.func _getBlendShapeName(index: Int32
) -> StringName Virtual method to override the retrieval of blend shape names for a custom class extending
Mesh
.func _getSurfaceCount(
) -> Int32 Virtual method to override the surface count for a custom class extending
Mesh
.func _setBlendShapeName(index: Int32, name: StringName
) Virtual method to override the names of blend shapes for a custom class extending
Mesh
.func _surfaceGetArrayIndexLen(index: Int32
) -> Int32 Virtual method to override the surface array index length for a custom class extending
Mesh
.func _surfaceGetArrayLen(index: Int32
) -> Int32 Virtual method to override the surface array length for a custom class extending
Mesh
.func _surfaceGetArrays(index: Int32
) -> GArray Virtual method to override the surface arrays for a custom class extending
Mesh
.func _surfaceGetBlendShapeArrays(index: Int32
) -> VariantCollection<GArray> Virtual method to override the blend shape arrays for a custom class extending
Mesh
.func _surfaceGetFormat(index: Int32
) -> UInt32 Virtual method to override the surface format for a custom class extending
Mesh
.func _surfaceGetLods(index: Int32
) -> GDictionary Virtual method to override the surface LODs for a custom class extending
Mesh
.func _surfaceGetMaterial(index: Int32
) -> Material? Virtual method to override the surface material for a custom class extending
Mesh
.func _surfaceGetPrimitiveType(index: Int32
) -> UInt32 Virtual method to override the surface primitive type for a custom class extending
Mesh
.func _surfaceSetMaterial(index: Int32, material: Material?
) Virtual method to override the setting of a
material
at the givenindex
for a custom class extendingMesh
.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.