One Logo Pool Ball
Spatial · IOS API REFERENCE

Ray3D

struct · iOS 16.0+ · SDK 27.1

struct Ray3D

Members (34)

method · iOS 18.0+

intersects

TypeScript
intersectsSphereOriginSphereRadius(sphereOrigin: Point3D, sphereRadius: number): boolean
Swift declaration
func intersects(sphereOrigin: Point3D, sphereRadius: Double) -> Bool
method · iOS 16.0+

translated

TypeScript
translatedBy(offset: Vector3D): Ray3D
Swift declaration
func translated(by offset: Vector3D) -> Ray3D
get · iOS 16.0+

direction

TypeScript
get direction(): Vector3D
Swift declaration
var direction: Vector3D
set · iOS 16.0+

direction

TypeScript
set direction(value: Vector3D)
Swift declaration
var direction: Vector3D
get · iOS 16.0+

origin

TypeScript
get origin(): Point3D
Swift declaration
var origin: Point3D
set · iOS 16.0+

origin

TypeScript
set origin(value: Point3D)
Swift declaration
var origin: Point3D
get · iOS 17.0+

infinity

TypeScript
static get infinity(): Ray3D
Swift declaration
static let infinity: Ray3D
get · iOS 17.0+

zero

TypeScript
static get zero(): Ray3D
Swift declaration
static let zero: Ray3D
init · iOS 16.0+

init

TypeScript
static initOriginDirection(origin: Point3D, direction: Vector3D): Ray3D
Swift declaration
init(origin: Point3D, direction: Vector3D)

Creates a ray from Spatial primitives that describe the origin and direction. - Parameter origin: The origin of the ray. - Parameter direction: The direction of the ray. - note: This function normalizes the direction vector.

method · iOS 16.0+

intersects

TypeScript
intersects(rect: Rect3D): boolean
Swift declaration
func intersects(_ rect: Rect3D) -> Bool

Returns `true` if the the ray intersects the specified rectangle. - Parameter rect: The second primitive.

method · iOS 16.0+

translated

TypeScript
translatedBy42390(size: Size3D): Ray3D
Swift declaration
func translated(by size: Size3D) -> Ray3D

Returns the entity translated by the specified size. - Parameter size: The size structure that defines that translation.

method · iOS 18.0+

unapplying

TypeScript
unapplying(scaledPose: ScaledPose3D): Ray3D
Swift declaration
func unapplying(_ scaledPose: ScaledPose3D) -> Ray3D

Returns a ray that's transformed by the inverse of the specified scaled pose. - Parameter pose: The scaled pose. - Returns The transformed ray. This function rotates the ray's direction by the pose's rotation and offsets the ray's origin by the pose's position.

method · iOS 17.0+

unapplying

TypeScript
unapplying45786(transform: AffineTransform3D): Ray3D
Swift declaration
func unapplying(_ transform: AffineTransform3D) -> Ray3D

Returns a ray that's transformed by the inverse of the specified affine transform. - Parameter transform: The affine transform. - Returns The transformed ray. This function applies the transform to the ray's origin and direction.

method · iOS 17.0+

unapplying

TypeScript
unapplying2691(transform: ProjectiveTransform3D): Ray3D
Swift declaration
func unapplying(_ transform: ProjectiveTransform3D) -> Ray3D

Returns a ray that's transformed by the inverse of the specified projective transform. - Parameter transform: The projective transform. - Returns The transformed ray. This function applies the transform to the ray's origin and direction.

method · iOS 17.0+

unapplying

TypeScript
unapplying29422(pose: Pose3D): Ray3D
Swift declaration
func unapplying(_ pose: Pose3D) -> Ray3D

Returns a ray that's transformed by the inverse of the specified pose. - Parameter pose: The pose. - Returns The transformed ray. This function rotates the ray's direction by the pose's rotation and offsets the ray's origin by the pose's position.

get · iOS 16.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 18.0+

customMirror

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

The custom mirror for this instance.

method · iOS 16.0+

apply

TypeScript
apply(pose: Pose3D): void
Swift declaration
mutating func apply(_ pose: Pose3D)

Applies a pose. - Parameter pose: The pose. This function rotate's the ray's direction by the pose's rotation and sets the ray's origin to the pose's position.

get · iOS 17.0+

isNaN

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

A Boolean value that indicates whether all of the values of the ray are finite.

get · iOS 17.0+

isZero

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

A Boolean value that indicates whether all of the values of the ray are zero.

init · iOS 16.0+

init

TypeScript
static initOriginDirection88617(origin: Point3D, direction: Vector3D): Ray3D
Swift declaration
init(origin: Point3D = .zero, direction: Vector3D)

Creates a ray from Spatial primitives that describe the origin and direction. - Parameter origin: The origin of the ray. - Parameter direction: The direction of the ray. - note: This function normalizes the direction vector.

init · iOS 16.0+

init

TypeScript
static initOriginDirection51440(origin: SDKHandle, direction: SDKHandle): Ray3D
Swift declaration
init(origin: simd_double3 = .zero, direction: simd_double3)

Creates a ray from double-precision simd vectors that describe the origin and direction. - Parameter origin: The origin of the ray. - Parameter direction: The direction of the ray. - note: This function normalizes the direction vector.

init · iOS 16.0+

init

TypeScript
static initOriginDirection5118(origin: SDKHandle, direction: SDKHandle): Ray3D
Swift declaration
init(origin: simd_float3 = .zero, direction: simd_float3)

Creates a ray from single-precision simd vectors that describe the origin and direction. - Parameter origin: The origin of the ray. - Parameter direction: direction of the rectangle. - note: This function normalizes the direction vector.

method · iOS 17.0+

rotated

TypeScript
rotatedByAround(quaternion: SDKHandle, pivot: Point3D): Ray3D
Swift declaration
func rotated(by quaternion: simd_quatd, around pivot: Point3D) -> Ray3D

Returns a ray that's rotated by the specified rotation around a specified pivot. - Parameter quaternion: The quaternion that defines the rotation. - Parameter pivot: The center of rotation.

method · iOS 17.0+

rotated

TypeScript
rotatedByAround10824(rotation: Rotation3D, pivot: Point3D): Ray3D
Swift declaration
func rotated(by rotation: Rotation3D, around pivot: Point3D) -> Ray3D

Returns a ray that's rotated by the specified rotation around a specified pivot. - Parameter rotation: The rotation. - Parameter pivot: The center of rotation.

method · iOS 16.0+

rotated

TypeScript
rotatedBy(quaternion: SDKHandle): Ray3D
Swift declaration
func rotated(by quaternion: simd_quatd) -> Ray3D

Returns a ray that's rotated by the specified quaternion. - Parameter quaternion: The quaternion that defines the rotation. - Returns A ray with a direction that's rotated by the specified quaternion.

method · iOS 16.0+

rotated

TypeScript
rotatedBy30755(rotation: Rotation3D): Ray3D
Swift declaration
func rotated(by rotation: Rotation3D) -> Ray3D

Returns a ray that's rotated by the specified rotation. - Parameter rotation: The rotation. - Returns A ray with a direction that's rotated by the specified rotation.

method · iOS 18.0+

applying

TypeScript
applying(scaledPose: ScaledPose3D): Ray3D
Swift declaration
func applying(_ scaledPose: ScaledPose3D) -> Ray3D

Returns a ray that's transformed by the specified scaled pose. - Parameter pose: The scaled pose. - Returns The transformed ray. This function rotates the ray's direction by the pose's rotation and offsets the ray's origin by the pose's position.

method · iOS 17.0+

applying

TypeScript
applying11592(transform: AffineTransform3D): Ray3D
Swift declaration
func applying(_ transform: AffineTransform3D) -> Ray3D

Returns a ray that's transformed by the specified affine transform. - Parameter transform: The affine transform. - Returns The transformed ray. This function applies the transform to the ray's origin and direction.

method · iOS 17.0+

applying

TypeScript
applying56857(transform: ProjectiveTransform3D): Ray3D
Swift declaration
func applying(_ transform: ProjectiveTransform3D) -> Ray3D

Returns a ray that's transformed by the specified projective transform. - Parameter transform: The projective transform. - Returns The transformed ray. This function applies the transform to the ray's origin and direction.

method · iOS 16.0+

applying

TypeScript
applying21312(pose: Pose3D): Ray3D
Swift declaration
func applying(_ pose: Pose3D) -> Ray3D

Returns a ray that's transformed by the specified pose. - Parameter pose: The pose. - Returns The transformed ray. This function rotates the ray's direction by the pose's rotation and offsets the ray's origin by the pose's position.

get · iOS 17.0+

isFinite

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

A Boolean value that indicates whether all of the values of the ray are finite.

init · iOS 26.0+

init

TypeScript
static init(ray: Ray3DFloat): Ray3D
Swift declaration
init(_ ray: Ray3DFloat)

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

init · iOS 16.0+

init

TypeScript
static init39042(): Ray3D
Swift declaration
init()

Skipped declarations

No declarations were skipped in this snapshot.

All Spatial types →