Instance Methodmigueldeicaza.swiftgodot 0.45.0SwiftGodot
addBlendShape(name:)
Adds name for a blend shape that will be added with addSurface(primitive:arrays:blendShapes:lods:material:name:flags:)
. Must be called before surface is added.
final func addBlendShape(name: String)
Other members in extension
Type members
Instance members
func addSurface(primitive: Mesh.PrimitiveType, arrays: GArray, blendShapes: VariantCollection<GArray>, lods: GDictionary, material: Material?, name: String, flags: UInt
) Creates a new surface.
getSurfaceCount
will become thesurf_idx
for this new surface.func clear(
) Removes all surfaces and blend shapes from this
ImporterMesh
.func generateLods(normalMergeAngle: Double, normalSplitAngle: Double, boneTransformArray: GArray
) Generates all lods for this ImporterMesh.
func getBlendShapeCount(
) -> Int32 Returns the number of blend shapes that the mesh holds.
func getBlendShapeMode(
) -> Mesh.BlendShapeMode Returns the blend shape mode for this Mesh.
func getBlendShapeName(blendShapeIdx: Int32
) -> String Returns the name of the blend shape at this index.
func getLightmapSizeHint(
) -> Vector2i Returns the size hint of this mesh for lightmap-unwrapping in UV-space.
func getMesh(baseMesh: ArrayMesh?
) -> ArrayMesh? Returns the mesh data represented by this
ImporterMesh
as a usableArrayMesh
.func getSurfaceArrays(surfaceIdx: Int32
) -> GArray Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface. See
addSurface(primitive:arrays:blendShapes:lods:material:name:flags:)
.func getSurfaceBlendShapeArrays(surfaceIdx: Int32, blendShapeIdx: Int32
) -> GArray Returns a single set of blend shape arrays for the requested blend shape index for a surface.
func getSurfaceCount(
) -> Int32 Returns the number of surfaces that the mesh holds.
func getSurfaceFormat(surfaceIdx: Int32
) -> UInt Returns the format of the surface that the mesh holds.
func getSurfaceLodCount(surfaceIdx: Int32
) -> Int32 Returns the number of lods that the mesh holds on a given surface.
func getSurfaceLodIndices(surfaceIdx: Int32, lodIdx: Int32
) -> PackedInt32Array Returns the index buffer of a lod for a surface.
func getSurfaceLodSize(surfaceIdx: Int32, lodIdx: Int32
) -> Double Returns the screen ratio which activates a lod for a surface.
func getSurfaceMaterial(surfaceIdx: Int32
) -> Material? Returns a
Material
in a given surface. Surface is rendered using this material.func getSurfaceName(surfaceIdx: Int32
) -> String Gets the name assigned to this surface.
func getSurfacePrimitiveType(surfaceIdx: Int32
) -> Mesh.PrimitiveType Returns the primitive type of the requested surface (see
addSurface(primitive:arrays:blendShapes:lods:material:name:flags:)
).func setBlendShapeMode(Mesh.BlendShapeMode
) Sets the blend shape mode to one of
Mesh.BlendShapeMode
.func setLightmapSizeHint(size: Vector2i
) Sets the size hint of this mesh for lightmap-unwrapping in UV-space.
func setSurfaceMaterial(surfaceIdx: Int32, material: Material?
) Sets a
Material
for a given surface. Surface will be rendered using this material.func setSurfaceName(surfaceIdx: Int32, name: String
) Sets a name for a given surface.