One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

EntityGeometricPins

struct · iOS 18.0+ · SDK 27.1

@MainActor struct EntityGeometricPins

A structure that wraps all geometric pins an entity owns. Access an instance of this structure through the entity property ``Entity/pins``.

Members (9)

method · iOS 18.0+

makeIterator

TypeScript
makeIterator(): Promise<EntityGeometricPins_Iterator>
Swift declaration
@MainActor func makeIterator() -> EntityGeometricPins.Iterator

Returns an iterator for the sequence.

method · iOS 18.0+

set

TypeScript
setNamedSkeletalJointNamePositionOrientation(name: string, skeletalJointName: string, position?: SDKHandle, orientation?: SDKHandle): Promise<GeometricPin>
Swift declaration
@discardableResult @MainActor func set(named name: String, skeletalJointName: String, position: SIMD3<Float> = SIMD3<Float>(0, 0, 0), orientation: simd_quatf = simd_quatf(ix: 0, iy: 0, iz: 0, r: 1)) -> GeometricPin

Creates and adds a geometric pin to the entity's skeletal joint, and returns the geometric pin. The pin is added to the entity's ``GeometricPinsComponent``. - Parameters: - name: Name of the `GeometricPin` in the namespace of the owning entity. - skeletalJointName: The name of the skeletal joint in the namespace of the owning entity. - position: The position of the pin, in local space of the joint. - orientation: The orientation of the pin, in local space of the joint. - Returns: A `GeometricPin`, identifying the newly added reference frame on the ``Entity``.

method · iOS 18.0+

set

TypeScript
setNamedPositionOrientationRelativeTo(name: string, position?: SDKHandle, orientation?: SDKHandle, referenceEntity?: (Entity) | null): Promise<GeometricPin>
Swift declaration
@discardableResult @MainActor func set(named name: String, position: SIMD3<Float> = SIMD3<Float>(0, 0, 0), orientation: simd_quatf = simd_quatf(ix: 0, iy: 0, iz: 0, r: 1), relativeTo referenceEntity: Entity?) -> GeometricPin

Creates and adds a geometric pin to the entity, and returns the entity geometric pin. The pin is added to the entity's ``GeometricPinsComponent``. - Parameters: - name: The name of the pin in the namespace of the owning entity. - position: The position of the pin, in local space of the reference entity. - orientation: The orientation of the pin, in local space of the reference entity. - referenceEntity: The entity that specifies the space of input `position` and `orientation`. The input `position` and `orientation` are in the world space when this reference entity is `nil`. - Returns: A `GeometricPin`, identifying the newly added reference frame on the ``Entity``.

method · iOS 18.0+

set

TypeScript
setNamedPositionOrientation(name: string, position?: SDKHandle, orientation?: SDKHandle): Promise<GeometricPin>
Swift declaration
@discardableResult @MainActor func set(named name: String, position: SIMD3<Float> = SIMD3<Float>(0, 0, 0), orientation: simd_quatf = simd_quatf(ix: 0, iy: 0, iz: 0, r: 1)) -> GeometricPin

Creates and adds a geometric pin to the entity, and returns the entity geometric pin. The pin is added to the entity's ``GeometricPinsComponent``. - Parameters: - name: The name of the pin in the namespace of the owning entity. - position: The position of the pin, in local space of the owning entity. - orientation: The orientation of the pin, in local space of the owning entity. - Returns: A `GeometricPin`, identifying the newly added reference frame on the ``Entity``.

get · iOS 18.0+

count

TypeScript
get count(): Promise<number>
Swift declaration
@MainActor var count: Int { get }

The total number of pins.

get · iOS 18.0+

entity

TypeScript
get entity(): Promise<Entity>
Swift declaration
@MainActor let entity: Entity

The entity where the local frame lives.

method · iOS 18.0+

remove

TypeScript
remove(name: string): Promise<void>
Swift declaration
@MainActor func remove(named name: String)

Removes a geometric pin with the given name from this entity. If found, the pin is removed from the entity's ``GeometricPinsComponent``. There is no effect if no matching ``GeometricPin`` is found. - Parameter name: The name of the geometric pin to remove.

get · iOS 18.0+

isEmpty

TypeScript
get isEmpty(): Promise<boolean>
Swift declaration
@MainActor var isEmpty: Bool { get }

A Boolean value indicating whether the collection is empty.

subscript · iOS 18.0+

subscript

TypeScript
subscript(name: string): Promise<(GeometricPin) | null>
Swift declaration
@MainActor subscript(name: String) -> GeometricPin? { get }

Obtains a geometric pin the entity owns by name. - Parameter name: The name of an existing pin the entity owns. - Returns: The pin that associates with the name, or `nil` if no pin with a matching name is found.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →