intersects
TypeScriptintersectsSphereOriginSphereRadius(sphereOrigin: Point3DFloat, sphereRadius: number): booleanSwift declarationfunc intersects(sphereOrigin: Point3DFloat, sphereRadius: Float) -> Boolstruct · iOS 26.0+ · SDK 27.1
struct Ray3DFloatintersectsSphereOriginSphereRadius(sphereOrigin: Point3DFloat, sphereRadius: number): booleanSwift declarationfunc intersects(sphereOrigin: Point3DFloat, sphereRadius: Float) -> Booltranslated(offset: Vector3DFloat): Ray3DFloatSwift declarationfunc translated(by offset: Vector3DFloat) -> Ray3DFloatget direction(): Vector3DFloatSwift declarationvar direction: Vector3DFloatset direction(value: Vector3DFloat)Swift declarationvar direction: Vector3DFloatget origin(): Point3DFloatSwift declarationvar origin: Point3DFloatset origin(value: Point3DFloat)Swift declarationvar origin: Point3DFloatstatic get infinity(): Ray3DFloatSwift declarationstatic let infinity: Ray3DFloatstatic get zero(): Ray3DFloatSwift declarationstatic let zero: Ray3DFloatstatic initOriginDirection(origin: Point3DFloat, direction: Vector3DFloat): Ray3DFloatSwift declarationinit(origin: Point3DFloat, direction: Vector3DFloat)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.
intersects(rect: Rect3DFloat): booleanSwift declarationfunc intersects(_ rect: Rect3DFloat) -> BoolReturns `true` if the the ray intersects the specified rectangle. - Parameter rect: The second primitive.
unapplying(scaledPose: ScaledPose3DFloat): Ray3DFloatSwift declarationfunc unapplying(_ scaledPose: ScaledPose3DFloat) -> Ray3DFloatReturns 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.
unapplying28203(transform: AffineTransform3DFloat): Ray3DFloatSwift declarationfunc unapplying(_ transform: AffineTransform3DFloat) -> Ray3DFloatReturns 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.
unapplying42960(transform: ProjectiveTransform3DFloat): Ray3DFloatSwift declarationfunc unapplying(_ transform: ProjectiveTransform3DFloat) -> Ray3DFloatReturns 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.
unapplying89563(pose: Pose3DFloat): Ray3DFloatSwift declarationfunc unapplying(_ pose: Pose3DFloat) -> Ray3DFloatReturns 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 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.
apply(pose: Pose3DFloat): voidSwift declarationmutating func apply(_ pose: Pose3DFloat)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 isNaN(): booleanSwift declarationvar isNaN: Bool { get }A Boolean value that indicates whether all of the values of the ray are finite.
get isZero(): booleanSwift declarationvar isZero: Bool { get }A Boolean value that indicates whether all of the values of the ray are zero.
static initOriginDirection19664(origin: Point3DFloat, direction: Vector3DFloat): Ray3DFloatSwift declarationinit(origin: Point3DFloat = .zero, direction: Vector3DFloat)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.
static initOriginDirection16564(origin: SDKHandle, direction: SDKHandle): Ray3DFloatSwift declarationinit(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.
rotatedByAround(rotation: Rotation3DFloat, pivot: Point3DFloat): Ray3DFloatSwift declarationfunc rotated(by rotation: Rotation3DFloat, around pivot: Point3DFloat) -> Ray3DFloatReturns a ray that's rotated by the specified rotation around a specified pivot. - Parameter rotation: The rotation. - Parameter pivot: The center of rotation.
rotatedByAround87476(quaternion: SDKHandle, pivot: Point3DFloat): Ray3DFloatSwift declarationfunc rotated(by quaternion: simd_quatf, around pivot: Point3DFloat) -> Ray3DFloatReturns 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.
rotatedBy(rotation: Rotation3DFloat): Ray3DFloatSwift declarationfunc rotated(by rotation: Rotation3DFloat) -> Ray3DFloatReturns 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.
rotatedBy52468(quaternion: SDKHandle): Ray3DFloatSwift declarationfunc rotated(by quaternion: simd_quatf) -> Ray3DFloatReturns 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.
applying(scaledPose: ScaledPose3DFloat): Ray3DFloatSwift declarationfunc applying(_ scaledPose: ScaledPose3DFloat) -> Ray3DFloatReturns 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.
applying17461(transform: AffineTransform3DFloat): Ray3DFloatSwift declarationfunc applying(_ transform: AffineTransform3DFloat) -> Ray3DFloatReturns 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.
applying92642(transform: ProjectiveTransform3DFloat): Ray3DFloatSwift declarationfunc applying(_ transform: ProjectiveTransform3DFloat) -> Ray3DFloatReturns 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.
applying77189(pose: Pose3DFloat): Ray3DFloatSwift declarationfunc applying(_ pose: Pose3DFloat) -> Ray3DFloatReturns 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 isFinite(): booleanSwift declarationvar isFinite: Bool { get }A Boolean value that indicates whether all of the values of the ray are finite.
static init(ray: Ray3D): Ray3DFloatSwift declarationinit(_ ray: Ray3D)Returns a single-precision ray from a double-precision ray.
static init55560(): Ray3DFloatSwift declarationinit()No declarations were skipped in this snapshot.