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
normalandrightAxiswhich defines the up, or y, axis for the projective plane.Declaration
Swift
@UnitVector public var upAxis: Vector { get set } -
A normalized vector perpendicular to
normalandupAxiswhich defines the right, or x, axis for the projective plane.This value is derived from
normalandupAxis, 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) -
Replaces this instance with a new
ProjectivePointNormalPlane3with the samepoint, but withnormal,upAxis, andrightAxisswapped out to specified values. TherightAxisvalue is computed from the providednormalandupAxisvalues.Declaration
Swift
public mutating func changeNormal(_ normal: Vector, upAxis: Vector) -
Returns a new
ProjectivePointNormalPlane3with the samepointas this plane’s, but withnormalandupAxis, andrightAxisswapped out to specified values. TherightAxisvalue is computed from the providednormalandupAxisvalues.Declaration
Swift
public func changingNormal(_ normal: Vector, upAxis: Vector) -> ProjectivePointNormalPlane3<Vector> -
Creates a new
ProjectivePointNormalPlane3by computingrightAxisas well as correctingupAxisduring creation to ensure it is fully perpendicular tonormal.Declaration
Swift
@inlinable static func makeCorrectedPlane(point: Vector, normal: Vector, upAxis: Vector) -> ProjectivePointNormalPlane3<Vector>Parameters
pointThe center point (origin) to this projective plane.
normalThe normal of the plane.
upAxisThe 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
nilif 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