Instance Methodmigueldeicaza.swiftgodot 0.45.0SwiftGodot
getFaceCount
Returns the number of faces in this Mesh
.
final func getFaceCount() -> Int32
Other members in extension
Type members
Instance members
func clear(
) Clears all data currently in MeshDataTool.
func commitToSurface(mesh: ArrayMesh?, compressionFlags: UInt
) -> GodotError Adds a new surface to specified
Mesh
with edited data.func createFromSurface(mesh: ArrayMesh?, surface: Int32
) -> GodotError Uses specified surface of given
Mesh
to populate data for MeshDataTool.func getEdgeCount(
) -> Int32 Returns the number of edges in this
Mesh
.func getEdgeFaces(idx: Int32
) -> PackedInt32Array Returns array of faces that touch given edge.
func getEdgeMeta(idx: Int32
) -> Variant Returns meta information assigned to given edge.
func getEdgeVertex(idx: Int32, vertex: Int32
) -> Int32 Returns index of specified vertex connected to given edge.
func getFaceEdge(idx: Int32, edge: Int32
) -> Int32 Returns specified edge associated with given face.
func getFaceMeta(idx: Int32
) -> Variant Returns the metadata associated with the given face.
func getFaceNormal(idx: Int32
) -> Vector3 Calculates and returns the face normal of the given face.
func getFaceVertex(idx: Int32, vertex: Int32
) -> Int32 Returns the specified vertex index of the given face.
func getFormat(
) -> UInt Returns the
Mesh
’s format. Format is an integer made up ofMesh
format flags combined together. For example, a mesh containing both vertices and normals would return a format of3
becauseMesh/ArrayFormat/vertex
is1
andMesh/ArrayFormat/normal
is2
.func getMaterial(
) -> Material? Returns the material assigned to the
Mesh
.func getVertex(idx: Int32
) -> Vector3 Returns the position of the given vertex.
func getVertexBones(idx: Int32
) -> PackedInt32Array Returns the bones of the given vertex.
func getVertexColor(idx: Int32
) -> Color Returns the color of the given vertex.
func getVertexCount(
) -> Int32 Returns the total number of vertices in
Mesh
.func getVertexEdges(idx: Int32
) -> PackedInt32Array Returns an array of edges that share the given vertex.
func getVertexFaces(idx: Int32
) -> PackedInt32Array Returns an array of faces that share the given vertex.
func getVertexMeta(idx: Int32
) -> Variant Returns the metadata associated with the given vertex.
func getVertexNormal(idx: Int32
) -> Vector3 Returns the normal of the given vertex.
func getVertexTangent(idx: Int32
) -> Plane Returns the tangent of the given vertex.
func getVertexUv(idx: Int32
) -> Vector2 Returns the UV of the given vertex.
func getVertexUv2(idx: Int32
) -> Vector2 Returns the UV2 of the given vertex.
func getVertexWeights(idx: Int32
) -> PackedFloat32Array Returns bone weights of the given vertex.
func setEdgeMeta(idx: Int32, meta: Variant
) Sets the metadata of the given edge.
func setFaceMeta(idx: Int32, meta: Variant
) Sets the metadata of the given face.
func setMaterial(Material?
) Sets the material to be used by newly-constructed
Mesh
.func setVertex(idx: Int32, vertex: Vector3
) Sets the position of the given vertex.
func setVertexBones(idx: Int32, bones: PackedInt32Array
) Sets the bones of the given vertex.
func setVertexColor(idx: Int32, color: Color
) Sets the color of the given vertex.
func setVertexMeta(idx: Int32, meta: Variant
) Sets the metadata associated with the given vertex.
func setVertexNormal(idx: Int32, normal: Vector3
) Sets the normal of the given vertex.
func setVertexTangent(idx: Int32, tangent: Plane
) Sets the tangent of the given vertex.
func setVertexUv(idx: Int32, uv: Vector2
) Sets the UV of the given vertex.
func setVertexUv2(idx: Int32, uv2: Vector2
) Sets the UV2 of the given vertex.
func setVertexWeights(idx: Int32, weights: PackedFloat32Array
) Sets the bone weights of the given vertex.