One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

BlendShapeWeightsSet

struct · iOS 18.0+ · SDK 27.1

struct BlendShapeWeightsSet

A custom collection of named blend shape weights. Retrieve a `BlendShapeWeightsSet` from a ``BlendShapeWeightsComponent`` to access the current weights and weight names for each blend shape managed by the component. Set the current weights for a blend shape by assigning a `BlendShapeWeightsSet` to a ``BlendShapeWeightsComponent`` for a specific blend shape. The collection allows: * Access to elements by name. * Protection that prohibits updating an element, where such an update would try to rename the stored element. ``BlendShapeWeightsSet`` does not support addition/removal of elements, as the blend shape weights are defined in the asset and the number and names of the weights are immutable.

Members (14)

get · iOS 18.0+

startIndex

TypeScript
get startIndex(): number
Swift declaration
var startIndex: BlendShapeWeightsSet.Index { get }

The index of the first entry in a non-empty set.

method · iOS 18.0+

makeIterator

TypeScript
makeIterator(): BlendShapeWeightsSet_Iterator
Swift declaration
func makeIterator() -> BlendShapeWeightsSet.Iterator

Returns an iterator over the elements of this sequence.

method · iOS 18.0+

set

TypeScript
set(newValue: BlendShapeWeightsData): (BlendShapeWeightsData) | null
Swift declaration
@discardableResult mutating func set(_ newValue: BlendShapeWeightsSet.Element) -> BlendShapeWeightsSet.Element?

Updates a blend shape weights data instance in the set based on its name. If blend shape weights data with this ID does not exist, does nothing. - Parameter newValue: The blend shape weights data to store. - Returns: The previous pose value, if named pose exists. nil otherwise.

get · iOS 18.0+

count

TypeScript
get count(): number
Swift declaration
var count: Int { get }

Number of blend shape weight data in the set.

method · iOS 18.0+

index

TypeScript
indexOf(blendShapeName: string): (number) | null
Swift declaration
func index(of blendShapeName: String) -> BlendShapeWeightsSet.Index?

Returns the index where the specified blend shape weights data appears in the collection.

method · iOS 18.0+

index

TypeScript
indexAfter(i: number): number
Swift declaration
func index(after i: BlendShapeWeightsSet.Index) -> BlendShapeWeightsSet.Index

Returns the index after the given index.

get · iOS 18.0+

default

TypeScript
get default(): (BlendShapeWeightsData) | null
Swift declaration
var `default`: BlendShapeWeightsSet.Element? { get set }

The blend shape weights data set that drives the model. This is equivalent to reading ``HasModel/blendWeights``.

set · iOS 18.0+

default

TypeScript
set default(value: (BlendShapeWeightsData) | null)
Swift declaration
var `default`: BlendShapeWeightsSet.Element? { get set }

The blend shape weights data set that drives the model. This is equivalent to reading ``HasModel/blendWeights``.

get · iOS 18.0+

isEmpty

TypeScript
get isEmpty(): boolean
Swift declaration
var isEmpty: Bool { get }

Checks if the set contains any blend shape weights data.

method · iOS 18.0+

contains

TypeScript
contains(blendShapeName: string): boolean
Swift declaration
func contains(_ blendShapeName: String) -> Bool

Checks if the set contains a blend shape weights data instance with the given name. - Parameter blendShapeName: The name of the blend shape to look up. - Returns: `true` blend shape weights data associated with the matching name is contained in the set.

get · iOS 18.0+

endIndex

TypeScript
get endIndex(): number
Swift declaration
var endIndex: BlendShapeWeightsSet.Index { get }

The index of the last entry in a non-empty set.

init · iOS 18.0+

init

TypeScript
static init(): BlendShapeWeightsSet
Swift declaration
init()

Creates an empty set.

subscript · iOS 18.0+

subscript

TypeScript
subscript(blendShapeName: string): (BlendShapeWeightsData) | null
Swift declaration
subscript(blendShapeName: String) -> BlendShapeWeightsSet.Element? { get }

Accessor for reading a blend shape weights data in the set. - Parameter blendShapeName: The name of the blend shape to be returned. - Returns: Blend shape weights data associated with the given name owned by this set, or nil if not found.

subscript · iOS 18.0+

subscript

TypeScript
subscript77229(index: number): BlendShapeWeightsData
Swift declaration
subscript(index: BlendShapeWeightsSet.Index) -> BlendShapeWeightsSet.Element { get set }

Accesses the blend shape weights data at the specified index.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →