isFinite
TypeScriptget isFinite(): booleanSwift declarationvar isFinite: Bool { get }struct · iOS 16.0+ · SDK 27.1
struct Vector3Dget isFinite(): booleanSwift declarationvar isFinite: Bool { get }get isNaN(): booleanSwift declarationvar isNaN: Bool { get }get isZero(): booleanSwift declarationvar isZero: Bool { get }static get zero(): Vector3DSwift declarationstatic let zero: Vector3Dstatic get infinity(): Vector3DSwift declarationstatic let infinity: Vector3Dget vector(): SDKHandleSwift declarationvar vector: simd_double3 { get set }set vector(value: SDKHandle)Swift declarationvar vector: simd_double3 { get set }get x(): numberSwift declarationvar x: Double { get set }set x(value: number)Swift declarationvar x: Double { get set }get y(): numberSwift declarationvar y: Double { get set }set y(value: number)Swift declarationvar y: Double { get set }get z(): numberSwift declarationvar z: Double { get set }set z(value: number)Swift declarationvar z: Double { get set }static initVector(vector: SDKHandle): Vector3DSwift declarationinit(vector: simd_double3)get normalized(): Vector3DSwift declarationvar normalized: Vector3D { get }Returns this vector with a length of `1`.
static smoothstep(edge0: Vector3D, edge1: Vector3D, x: Vector3D): Vector3DSwift declarationstatic func smoothstep(edge0: Vector3D, edge1: Vector3D, x: Vector3D) -> Vector3DReturns 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`.
unapplying(scaledPose: ScaledPose3D): Vector3DSwift declarationfunc unapplying(_ scaledPose: ScaledPose3D) -> Vector3DReturns the primitive that results from unapplying a scaled pose to the primitive. - Parameter pose: The scaled pose. - Returns The transformed primitive.
unapplying1261(transform: AffineTransform3D): Vector3DSwift declarationfunc unapplying(_ transform: AffineTransform3D) -> Vector3DReturns the vector that results from unapplying an affine transform to the vector. - Parameter transform: The affine transform. - Returns The transformed primitive.
unapplying96568(transform: ProjectiveTransform3D): Vector3DSwift declarationfunc unapplying(_ transform: ProjectiveTransform3D) -> Vector3DReturns the vector that results from unapplying a projective transform to the vector. - Parameter transform: The projective transform. - Returns The transformed primitive.
unapplying1497(pose: Pose3D): Vector3DSwift declarationfunc unapplying(_ pose: Pose3D) -> Vector3DReturns the primitive that results from applying a pose to the primitive. - Parameter pose: The pose. - Returns The transformed primitive.
get description(): stringSwift declarationvar 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 customMirror(): SDKHandleSwift declarationvar customMirror: Mirror { get }The custom mirror for this instance.
get lengthSquared(): numberSwift declarationvar lengthSquared: Double { get }uniformlyScaled(scale: number): Vector3DSwift declarationfunc uniformlyScaled(by scale: Double) -> Vector3DReturns the entity uniformly scaled by the specified scalar value. - Parameter scale: The value that defines that scale. - Returns The scaled vector.
static initXYZ(x?: number, y?: number, z?: number): Vector3DSwift declarationinit(x: Double = 0, y: Double = 0, z: Double = 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.
static initXYZ86701(x: number, y: number, z: number): Vector3DSwift declarationinit<T>(x: T, y: T, z: T) where T : BinaryFloatingPointReturns a new vector from the floating-point values. - note: This function is provided as a convenience. All Spatial storage and calculations are double-precision.
static get up(): Vector3DSwift declarationstatic let up: Vector3DA vector with values `[0, 1, 0]`.
dot(other: Vector3D): numberSwift declarationfunc dot(_ other: Vector3D) -> DoubleReturns the dot product of this vector and the specified vector.
static lerp(from: Vector3D, to: Vector3D, t: Vector3D): Vector3DSwift declarationstatic func lerp(from: Vector3D, to: Vector3D, t: Vector3D) -> Vector3DReturns 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.
cross(other: Vector3D): Vector3DSwift declarationfunc cross(_ other: Vector3D) -> Vector3DReturns the cross product of this vector and the specified vector.
static get right(): Vector3DSwift declarationstatic let right: Vector3DA vector with values `[1, 0, 0]`.
get length(): numberSwift declarationvar length: Double { get }scaled(size: Size3D): Vector3DSwift declarationfunc scaled(by size: Size3D) -> Vector3DReturns the vector scaled by the specified size. - Parameter size: The size structure that defines that scale. - Returns The scaled vector.
static get forward(): Vector3DSwift declarationstatic let forward: Vector3DA vector with values `[0, 0, 1]`.
rotatedBy(quaternion: SDKHandle): Vector3DSwift declarationfunc rotated(by quaternion: simd_quatd) -> Vector3DReturns the vector rotated by the specified quaternion around the origin. - Parameter quaternion: The quaternion that defines the rotation. - Returns The rotated vector.
rotatedBy32266(rotation: Rotation3D): Vector3DSwift declarationfunc rotated(by rotation: Rotation3D) -> Vector3DReturns the vector rotated by the specified rotation around the origin. - Parameter rotation: The rotation. - Returns The rotated vector.
sheared(shear: AxisWithFactors): Vector3DSwift declarationfunc sheared(_ shear: AxisWithFactors) -> Vector3DReturns a sheared vector. - Parameter shear: The axis and shear factors. - Returns The sheared vector.
applying(scaledPose: ScaledPose3D): Vector3DSwift declarationfunc applying(_ scaledPose: ScaledPose3D) -> Vector3DReturns the primitive that results from applying a scaled pose to the primitive. - Parameter pose: The scaled pose. - Returns The transformed primitive.
applying33501(transform: AffineTransform3D): Vector3DSwift declarationfunc applying(_ transform: AffineTransform3D) -> Vector3DReturns the vector that results from applying an affine transform to the vector. - Parameter transform: The affine transform. - Returns The transformed primitive.
applying26088(transform: ProjectiveTransform3D): Vector3DSwift declarationfunc applying(_ transform: ProjectiveTransform3D) -> Vector3DReturns the vector that results from applying a projective transform to the vector. - Parameter transform: The projective transform. - Returns The transformed primitive.
applying9385(pose: Pose3D): Vector3DSwift declarationfunc applying(_ pose: Pose3D) -> Vector3DReturns the primitive that results from applying a pose to the primitive. - Parameter pose: The pose. - Returns The transformed primitive.
rotation(other: Vector3D): Rotation3DSwift declarationfunc rotation(to other: Vector3D) -> Rotation3DReturns the rotation from the normalized first vector to the normalized second vector.
scaledBy(x?: number, y?: number, z?: number): Vector3DSwift declarationfunc scaledBy(x: Double = 1, y: Double = 1, z: Double = 1) -> Vector3DReturns 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.
normalize(): voidSwift declarationmutating func normalize()Normalizes the vector.
projected(other: Vector3D): Vector3DSwift declarationfunc projected(_ other: Vector3D) -> Vector3DReturns this vector projected onto the specified vector.
reflected(normal: Vector3D): Vector3DSwift declarationfunc reflected(_ normal: Vector3D) -> Vector3DReturns the reflection direction of this incident vector and the specified unit normal vector.
static init(vector: Vector3DFloat): Vector3DSwift declarationinit(_ vector: Vector3DFloat)Returns a double-precision vector from a single-precision vector.
static init65124(axis: RotationAxis3D): Vector3DSwift declarationinit(_ axis: RotationAxis3D)Returns a new vector from a rotation axis. - Parameter axis: The source rotation axis.
static init57812(coords: SphericalCoordinates3D): Vector3DSwift declarationinit(_ coords: SphericalCoordinates3D)Creates a new vector structure that contains the spherical coordinates converted to Cartesian coordinates. - Parameter coords: The spherical coordinates.
static init96699(size: Size3D): Vector3DSwift declarationinit(_ size: Size3D)Returns a new vector from a size. - Parameter size: The source size.
static init26545(point: Point3D): Vector3DSwift declarationinit(_ point: Point3D)Returns a new vector from a point. - Parameter point: The source point.
static init51462(xyz: SDKHandle): Vector3DSwift declarationinit(_ xyz: simd_double3)Returns a new vector from a double-precision vector. - Parameter xyz: The source vector.
static init78140(xyz: SDKHandle): Vector3DSwift declarationinit(_ xyz: simd_float3)Returns a vector point from a single-precision vector. - note: This function is provided as a convenience. All Spatial storage and calculations are double-precision.
static init28359(source: SDKHandle): Vector3DSwift declarationinit(_ source: simd_packed_double4)Creates a Spatial vector from a simd packed vector.
static init65919(): Vector3DSwift declarationinit()No declarations were skipped in this snapshot.