DirectionalRay3

extension DirectionalRay3: Line3Type where Vector.SubVector2: Vector2FloatingPoint
extension DirectionalRay3: Line3FloatingPoint where Vector: Vector3Type & VectorFloatingPoint, Vector.SubVector2: Vector2FloatingPoint

Available where Vector.SubVector2: Vector2FloatingPoint

  • Declaration

    Swift

    public typealias SubLine2 = DirectionalRay2<Vector.SubVector2>
  • Initializes a new Directional Ray with 3D vectors describing the start and secondary point the ray crosses before projecting towards infinity.

    The direction will be normalized before initializing.

    Precondition

    Vector(x: x2 - x1, y: y2 - y1, z: z2 - z1).length > 0

    Declaration

    Swift

    public init(x1: Scalar, y1: Scalar, z1: Scalar, x2: Scalar, y2: Scalar, z2: Scalar)
  • Initializes a new Ray with a 3D vector for its position and another describing the direction of the ray relative to the position.

    Declaration

    Swift

    public init(x: Scalar, y: Scalar, z: Scalar, dx: Scalar, dy: Scalar, dz: Scalar)
  • Creates a 2D line of the same underlying type as this line.

    Declaration

    Swift

    public static func make2DLine(_ a: SubLine2.Vector, _ b: SubLine2.Vector) -> SubLine2