ProjectivePointNormalPlane3

public struct ProjectivePointNormalPlane3<Vector> : PointProjectablePlaneType where Vector : Vector3FloatingPoint
extension ProjectivePointNormalPlane3: ProjectiveSpace
extension ProjectivePointNormalPlane3: PlaneProjectiveSpace
extension ProjectivePointNormalPlane3: Equatable where Vector: Equatable
extension ProjectivePointNormalPlane3: Hashable where Vector: Hashable

A point-normal plane with a separate up and right vector used to control projection on the axis of the plane and compute the local X and Y axis.

  • A point on this plane.

    Declaration

    Swift

    public var point: Vector
  • The normal of the plane’s surface.

    Declaration

    Swift

    @UnitVector
    public var normal: Vector { get set }
  • A normalized vector perpendicular to normal and rightAxis which defines the up, or y, axis for the projective plane.

    Declaration

    Swift

    @UnitVector
    public var upAxis: Vector { get set }
  • A normalized vector perpendicular to normal and upAxis which defines the right, or x, axis for the projective plane.

    This value is derived from normal and upAxis, and is provided along with those values to reduce recomputation when handling projections.

    Declaration

    Swift

    @UnitVector
    public var rightAxis: Vector { get set }
  • Declaration

    Swift

    public var pointOnPlane: Vector { get }
  • Declaration

    Swift

    public init(point: Vector, normal: Vector, upAxis: Vector, rightAxis: Vector)
  • Updates the value of this instance’s point.

    All other values remain the same.

    Declaration

    Swift

    public mutating func changePoint(_ point: Vector)
  • Returns a new ProjectivePointNormalPlane3 with the same normal, upAxis, and rightAxis as this plane’s, but with point swapped out to a specified value.

    Declaration

    Swift

    public func changingPoint(_ point: Vector) -> ProjectivePointNormalPlane3<Vector>
  • Replaces this instance with a new ProjectivePointNormalPlane3 with the same point, but with normal, upAxis, and rightAxis swapped out to specified values. The rightAxis value is computed from the provided normal and upAxis values.

    Declaration

    Swift

    public mutating func changeNormal(_ normal: Vector, upAxis: Vector)
  • Returns a new ProjectivePointNormalPlane3 with the same point as this plane’s, but with normal and upAxis, and rightAxis swapped out to specified values. The rightAxis value is computed from the provided normal and upAxis values.

    Declaration

    Swift

    public func changingNormal(_ normal: Vector, upAxis: Vector) -> ProjectivePointNormalPlane3<Vector>
  • Creates a new ProjectivePointNormalPlane3 by computing rightAxis as well as correcting upAxis during creation to ensure it is fully perpendicular to normal.

    Declaration

    Swift

    @inlinable
    static func makeCorrectedPlane(point: Vector, normal: Vector, upAxis: Vector) -> ProjectivePointNormalPlane3<Vector>

    Parameters

    point

    The center point (origin) to this projective plane.

    normal

    The normal of the plane.

    upAxis

    The up-axis of the plane.

  • Returns a point normal plane with the same point and normal as this plane’s.

    Declaration

    Swift

    var asPointNormalPlane: PointNormalPlane3<Vector> { get }
  • Declaration

    Swift

    public typealias Coordinates = Vector.SubVector2
  • With a given line, perform a plane-line intersection and project the resulting intersection vector into this projective plane.

    Returns nil if this plane and the given line do not intersect.

    Declaration

    Swift

    public func projectLineIntersection<Line: Line3FloatingPoint>(
        _ line: Line
    ) -> Coordinates? where Line.Vector == Vector
  • Performs a projection of a given vector onto this plane.

    Declaration

    Swift

    public func project2D(_ vector: Vector) -> Coordinates
  • Declaration

    Swift

    @inlinable
    public func attemptProjection(_ vector: Vector) -> Coordinates?
  • Declaration

    Swift

    @inlinable
    public func projectOut(_ proj: Coordinates) -> Vector