One Logo Pool Ball
Spatial · IOS API REFERENCE

Vector3DFloat

struct · iOS 26.0+ · SDK 27.1

struct Vector3DFloat

Members (55)

get · iOS 26.0+

isFinite

TypeScript
get isFinite(): boolean
Swift declaration
var isFinite: Bool { get }
get · iOS 26.0+

isNaN

TypeScript
get isNaN(): boolean
Swift declaration
var isNaN: Bool { get }
get · iOS 26.0+

isZero

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

infinity

TypeScript
static get infinity(): Vector3DFloat
Swift declaration
static let infinity: Vector3DFloat
get

zero

TypeScript
static get zero(): Vector3DFloat
Swift declaration
static let zero: Vector3DFloat
get · iOS 26.0+

vector

TypeScript
get vector(): SDKHandle
Swift declaration
var vector: simd_float3 { get set }
set · iOS 26.0+

vector

TypeScript
set vector(value: SDKHandle)
Swift declaration
var vector: simd_float3 { get set }
get · iOS 26.0+

x

TypeScript
get x(): number
Swift declaration
var x: Float { get set }
set · iOS 26.0+

x

TypeScript
set x(value: number)
Swift declaration
var x: Float { get set }
get · iOS 26.0+

y

TypeScript
get y(): number
Swift declaration
var y: Float { get set }
set · iOS 26.0+

y

TypeScript
set y(value: number)
Swift declaration
var y: Float { get set }
get · iOS 26.0+

z

TypeScript
get z(): number
Swift declaration
var z: Float { get set }
set · iOS 26.0+

z

TypeScript
set z(value: number)
Swift declaration
var z: Float { get set }
init · iOS 26.0+

init

TypeScript
static initVector(vector: SDKHandle): Vector3DFloat
Swift declaration
init(vector: simd_float3)
get · iOS 26.0+

normalized

TypeScript
get normalized(): Vector3DFloat
Swift declaration
var normalized: Vector3DFloat { get }

Returns this vector with a length of `1`.

static · iOS 26.0+

smoothstep

TypeScript
static smoothstep(edge0: Vector3DFloat, edge1: Vector3DFloat, x: Vector3DFloat): Vector3DFloat
Swift declaration
static func smoothstep(edge0: Vector3DFloat, edge1: Vector3DFloat, x: Vector3DFloat) -> Vector3DFloat

Returns a Spatial vector that represents the smooth interpolation at `x` between two vectors. - Parameter edge0: The lower edge of the interpolation function. - Parameter edge1: The upper edge of the interpolation function. - Parameter x: The value that the function interpolates at. - Returns: A new vector with each element set to `0` if `x <= edge0`, `1` if `x >= edge1`, and a Hermite interpolation between `0` and `1` if `edge0 < x < edge1`.

method · iOS 26.0+

unapplying

TypeScript
unapplying(scaledPose: ScaledPose3DFloat): Vector3DFloat
Swift declaration
func unapplying(_ scaledPose: ScaledPose3DFloat) -> Vector3DFloat

Returns the primitive that results from unapplying a scaled pose to the primitive. - Parameter pose: The scaled pose. - Returns The transformed primitive.

method · iOS 26.0+

unapplying

TypeScript
unapplying3669(transform: AffineTransform3DFloat): Vector3DFloat
Swift declaration
func unapplying(_ transform: AffineTransform3DFloat) -> Vector3DFloat

Returns the vector that results from unapplying an affine transform to the vector. - Parameter transform: The affine transform. - Returns The transformed primitive.

method · iOS 26.0+

unapplying

TypeScript
unapplying57954(transform: ProjectiveTransform3DFloat): Vector3DFloat
Swift declaration
func unapplying(_ transform: ProjectiveTransform3DFloat) -> Vector3DFloat

Returns the vector that results from unapplying a projective transform to the vector. - Parameter transform: The projective transform. - Returns The transformed primitive.

method · iOS 26.0+

unapplying

TypeScript
unapplying76453(pose: Pose3DFloat): Vector3DFloat
Swift declaration
func unapplying(_ pose: Pose3DFloat) -> Vector3DFloat

Returns the primitive that results from applying a pose to the primitive. - Parameter pose: The pose. - Returns The transformed primitive.

get · iOS 26.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

get · iOS 26.0+

customMirror

TypeScript
get customMirror(): SDKHandle
Swift declaration
var customMirror: Mirror { get }

The custom mirror for this instance.

get · iOS 26.0+

lengthSquared

TypeScript
get lengthSquared(): number
Swift declaration
var lengthSquared: Float { get }
method · iOS 26.0+

uniformlyScaled

TypeScript
uniformlyScaled(scale: number): Vector3DFloat
Swift declaration
func uniformlyScaled(by scale: Float) -> Vector3DFloat

Returns the entity uniformly scaled by the specified scalar value. - Parameter scale: The value that defines that scale. - Returns The scaled vector.

init · iOS 26.0+

init

TypeScript
static initXYZ(x?: number, y?: number, z?: number): Vector3DFloat
Swift declaration
init(x: Float = 0, y: Float = 0, z: Float = 0)

Returns a vector from the specified values. - Parameter x: The first element of the vector. - Parameter y: The second element of the vector. - Parameter z: The third element of the vector.

init · iOS 26.0+

init

TypeScript
static initXYZ67034(x: number, y: number, z: number): Vector3DFloat
Swift declaration
init<T>(x: T, y: T, z: T) where T : BinaryFloatingPoint

Returns a new vector from the doubleing-point values. - note: This function is provided as a convenience. All Spatial storage and calculations are single-precision.

get · iOS 26.0+

up

TypeScript
static get up(): Vector3DFloat
Swift declaration
static let up: Vector3DFloat

A vector with values `[0, 1, 0]`.

method · iOS 26.0+

dot

TypeScript
dot(other: Vector3DFloat): number
Swift declaration
func dot(_ other: Vector3DFloat) -> Float

Returns the dot product of this vector and the specified vector.

static · iOS 26.0+

lerp

TypeScript
static lerp(from: Vector3DFloat, to: Vector3DFloat, t: Vector3DFloat): Vector3DFloat
Swift declaration
static func lerp(from: Vector3DFloat, to: Vector3DFloat, t: Vector3DFloat) -> Vector3DFloat

Returns a Spatial vector that represents the linear interpolation at `t` between two vectors. - Parameter from: The starting vector. - Parameter to: The ending vector. - Parameter t: The value, between `0` and `1`, that the function interpolates at. - Returns: A new rotation. When `t=0`, the result is the `from` vector. When `t=1.0`, the result is the `to` vector. For any other value of `t`, the result is a linear linear interpolation between the two vectors.

method · iOS 26.0+

cross

TypeScript
cross(other: Vector3DFloat): Vector3DFloat
Swift declaration
func cross(_ other: Vector3DFloat) -> Vector3DFloat

Returns the cross product of this vector and the specified vector.

get · iOS 26.0+

right

TypeScript
static get right(): Vector3DFloat
Swift declaration
static let right: Vector3DFloat

A vector with values `[1, 0, 0]`.

get · iOS 26.0+

length

TypeScript
get length(): number
Swift declaration
var length: Float { get }
method · iOS 26.0+

scaled

TypeScript
scaled(size: Size3DFloat): Vector3DFloat
Swift declaration
func scaled(by size: Size3DFloat) -> Vector3DFloat

Returns the vector scaled by the specified size. - Parameter size: The size structure that defines that scale. - Returns The scaled vector.

get · iOS 26.0+

forward

TypeScript
static get forward(): Vector3DFloat
Swift declaration
static let forward: Vector3DFloat

A vector with values `[0, 0, 1]`.

method · iOS 26.0+

rotated

TypeScript
rotatedBy(rotation: Rotation3DFloat): Vector3DFloat
Swift declaration
func rotated(by rotation: Rotation3DFloat) -> Vector3DFloat

Returns the vector rotated by the specified rotation around the origin. - Parameter rotation: The rotation. - Returns The rotated vector.

method · iOS 26.0+

rotated

TypeScript
rotatedBy24026(quaternion: SDKHandle): Vector3DFloat
Swift declaration
func rotated(by quaternion: simd_quatf) -> Vector3DFloat

Returns the vector rotated by the specified quaternion around the origin. - Parameter quaternion: The quaternion that defines the rotation. - Returns The rotated vector.

method · iOS 26.0+

sheared

TypeScript
sheared(shear: AxisWithFactors): Vector3DFloat
Swift declaration
func sheared(_ shear: AxisWithFactors) -> Vector3DFloat

Returns a sheared vector. - Parameter shear: The axis and shear factors. - Returns The sheared vector.

method · iOS 26.0+

applying

TypeScript
applying(scaledPose: ScaledPose3DFloat): Vector3DFloat
Swift declaration
func applying(_ scaledPose: ScaledPose3DFloat) -> Vector3DFloat

Returns the primitive that results from applying a scaled pose to the primitive. - Parameter pose: The scaled pose. - Returns The transformed primitive.

method · iOS 26.0+

applying

TypeScript
applying41255(transform: AffineTransform3DFloat): Vector3DFloat
Swift declaration
func applying(_ transform: AffineTransform3DFloat) -> Vector3DFloat

Returns the vector that results from applying an affine transform to the vector. - Parameter transform: The affine transform. - Returns The transformed primitive.

method · iOS 26.0+

applying

TypeScript
applying64228(transform: ProjectiveTransform3DFloat): Vector3DFloat
Swift declaration
func applying(_ transform: ProjectiveTransform3DFloat) -> Vector3DFloat

Returns the vector that results from applying a projective transform to the vector. - Parameter transform: The projective transform. - Returns The transformed primitive.

method · iOS 26.0+

applying

TypeScript
applying20519(pose: Pose3DFloat): Vector3DFloat
Swift declaration
func applying(_ pose: Pose3DFloat) -> Vector3DFloat

Returns the primitive that results from applying a pose to the primitive. - Parameter pose: The pose. - Returns The transformed primitive.

method · iOS 26.0+

rotation

TypeScript
rotation(other: Vector3DFloat): Rotation3DFloat
Swift declaration
func rotation(to other: Vector3DFloat) -> Rotation3DFloat

Returns the rotation from the normalized first vector to the normalized second vector.

method · iOS 26.0+

scaledBy

TypeScript
scaledBy(x?: number, y?: number, z?: number): Vector3DFloat
Swift declaration
func scaledBy(x: Float = 1, y: Float = 1, z: Float = 1) -> Vector3DFloat

Returns the vector scaled by the specified values. - Parameter x: The scale factor on the `x` dimension. - Parameter y: The scale factor on the `y` dimension. - Parameter z: The scale factor on the `z` dimension. - Returns The scaled vector.

method · iOS 26.0+

normalize

TypeScript
normalize(): void
Swift declaration
mutating func normalize()

Normalizes the vector.

method · iOS 26.0+

projected

TypeScript
projected(other: Vector3DFloat): Vector3DFloat
Swift declaration
func projected(_ other: Vector3DFloat) -> Vector3DFloat

Returns this vector projected onto the specified vector.

method · iOS 26.0+

reflected

TypeScript
reflected(normal: Vector3DFloat): Vector3DFloat
Swift declaration
func reflected(_ normal: Vector3DFloat) -> Vector3DFloat

Returns the reflection direction of this incident vector and the specified unit normal vector.

init · iOS 26.0+

init

TypeScript
static init(axis: RotationAxis3DFloat): Vector3DFloat
Swift declaration
init(_ axis: RotationAxis3DFloat)

Returns a new vector from a rotation axis. - Parameter axis: The source rotation axis.

init · iOS 26.0+

init

TypeScript
static init47528(coords: SphericalCoordinates3DFloat): Vector3DFloat
Swift declaration
init(_ coords: SphericalCoordinates3DFloat)

Creates a new vector structure that contains the spherical coordinates converted to Cartesian coordinates. - Parameter coords: The spherical coordinates.

init · iOS 26.0+

init

TypeScript
static init68627(size: Size3DFloat): Vector3DFloat
Swift declaration
init(_ size: Size3DFloat)

Returns a new vector from a size. - Parameter size: The source size.

init · iOS 26.0+

init

TypeScript
static init42463(point: Point3DFloat): Vector3DFloat
Swift declaration
init(_ point: Point3DFloat)

Returns a new vector from a point. - Parameter point: The source point.

init · iOS 26.0+

init

TypeScript
static init26095(vector: Vector3D): Vector3DFloat
Swift declaration
init(_ vector: Vector3D)

Returns a single-precision vector from a double-precision vector.

init · iOS 26.0+

init

TypeScript
static init55921(xyz: SDKHandle): Vector3DFloat
Swift declaration
init(_ xyz: simd_double3)

Returns a vector point from a single-precision vector. - note: This function is provided as a convenience. All Spatial storage and calculations are single-precision.

init · iOS 26.0+

init

TypeScript
static init25127(xyz: SDKHandle): Vector3DFloat
Swift declaration
init(_ xyz: simd_float3)

Returns a new vector from a single-precision vector. - Parameter xyz: The source vector.

init · iOS 26.0+

init

TypeScript
static init2478(source: SDKHandle): Vector3DFloat
Swift declaration
init(_ source: simd_packed_float4)

Creates a Spatial vector from a simd packed vector.

init · iOS 26.0+

init

TypeScript
static init34322(): Vector3DFloat
Swift declaration
init()

Skipped declarations

No declarations were skipped in this snapshot.

All Spatial types →