intersects
TypeScriptintersectsSphereOriginSphereRadius(sphereOrigin: Point3D, sphereRadius: number): booleanSwift declarationfunc intersects(sphereOrigin: Point3D, sphereRadius: Double) -> Boolstruct · iOS 16.0+ · SDK 27.1
struct Ray3DintersectsSphereOriginSphereRadius(sphereOrigin: Point3D, sphereRadius: number): booleanSwift declarationfunc intersects(sphereOrigin: Point3D, sphereRadius: Double) -> BooltranslatedBy(offset: Vector3D): Ray3DSwift declarationfunc translated(by offset: Vector3D) -> Ray3Dget direction(): Vector3DSwift declarationvar direction: Vector3Dset direction(value: Vector3D)Swift declarationvar direction: Vector3Dget origin(): Point3DSwift declarationvar origin: Point3Dset origin(value: Point3D)Swift declarationvar origin: Point3Dstatic get infinity(): Ray3DSwift declarationstatic let infinity: Ray3Dstatic get zero(): Ray3DSwift declarationstatic let zero: Ray3Dstatic initOriginDirection(origin: Point3D, direction: Vector3D): Ray3DSwift declarationinit(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.
intersects(rect: Rect3D): booleanSwift declarationfunc intersects(_ rect: Rect3D) -> BoolReturns `true` if the the ray intersects the specified rectangle. - Parameter rect: The second primitive.
translatedBy42390(size: Size3D): Ray3DSwift declarationfunc translated(by size: Size3D) -> Ray3DReturns the entity translated by the specified size. - Parameter size: The size structure that defines that translation.
unapplying(scaledPose: ScaledPose3D): Ray3DSwift declarationfunc unapplying(_ scaledPose: ScaledPose3D) -> Ray3DReturns 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.
unapplying45786(transform: AffineTransform3D): Ray3DSwift declarationfunc unapplying(_ transform: AffineTransform3D) -> Ray3DReturns 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.
unapplying2691(transform: ProjectiveTransform3D): Ray3DSwift declarationfunc unapplying(_ transform: ProjectiveTransform3D) -> Ray3DReturns 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.
unapplying29422(pose: Pose3D): Ray3DSwift declarationfunc unapplying(_ pose: Pose3D) -> Ray3DReturns 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: Pose3D): voidSwift declarationmutating 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 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 initOriginDirection88617(origin: Point3D, direction: Vector3D): Ray3DSwift declarationinit(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.
static initOriginDirection51440(origin: SDKHandle, direction: SDKHandle): Ray3DSwift declarationinit(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.
static initOriginDirection5118(origin: SDKHandle, direction: SDKHandle): Ray3DSwift 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(quaternion: SDKHandle, pivot: Point3D): Ray3DSwift declarationfunc rotated(by quaternion: simd_quatd, around pivot: Point3D) -> Ray3DReturns 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.
rotatedByAround10824(rotation: Rotation3D, pivot: Point3D): Ray3DSwift declarationfunc rotated(by rotation: Rotation3D, around pivot: Point3D) -> Ray3DReturns a ray that's rotated by the specified rotation around a specified pivot. - Parameter rotation: The rotation. - Parameter pivot: The center of rotation.
rotatedBy(quaternion: SDKHandle): Ray3DSwift declarationfunc rotated(by quaternion: simd_quatd) -> Ray3DReturns 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.
rotatedBy30755(rotation: Rotation3D): Ray3DSwift declarationfunc rotated(by rotation: Rotation3D) -> Ray3DReturns 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.
applying(scaledPose: ScaledPose3D): Ray3DSwift declarationfunc applying(_ scaledPose: ScaledPose3D) -> Ray3DReturns 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.
applying11592(transform: AffineTransform3D): Ray3DSwift declarationfunc applying(_ transform: AffineTransform3D) -> Ray3DReturns 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.
applying56857(transform: ProjectiveTransform3D): Ray3DSwift declarationfunc applying(_ transform: ProjectiveTransform3D) -> Ray3DReturns 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.
applying21312(pose: Pose3D): Ray3DSwift declarationfunc applying(_ pose: Pose3D) -> Ray3DReturns 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: Ray3DFloat): Ray3DSwift declarationinit(_ ray: Ray3DFloat)Returns a double-precision ray from a single-precision ray.
static init39042(): Ray3DSwift declarationinit()No declarations were skipped in this snapshot.