Plane3dByOriginAndVectors Class

A Plane3dByOriginAndVectors is an origin and a pair of vectors. This defines a plane with a (possibly skewed) uv coordinate grid

  • The grid directions (vectorU and vectorV)
    • are NOT required to be unit vectors.
    • are NOT required to be perpendicular vectors.
  • The skewed, non-uniform scaling of the grid directions is the primary focus of this class.
  • Queries of altitude, velocity, normalX, normalY, and normalZ use the NORMALIZED cross product of vectorU and vectorV as plane normal.

Extends

Implements

Methods

Name Description
altitude(xyz: Readonly<WritableXYAndZ>): number Return signed cartesian altitude perpendicular to the plane.  
altitudeXYZ(x: number, y: number, z: number): number Return signed cartesian altitude perpendicular to the plane.  
clone(result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Clone to a new plane.  
fractionToPoint(u: number, v: number, result?: Point3d): Point3d Evaluate a point a grid coordinates on the plane.  
fractionToVector(u: number, v: number, result?: Vector3d): Vector3d Return the vector from the plane origin to parametric coordinate (u.v)  
getAnyPointOnPlane(result?: Point3d): Point3d Return some point on the plane.  
getUnitNormal(result?: Vector3d): undefined | Vector3d Return (if possible) a unit normal to the plane  
isAlmostEqual(other: Plane3dByOriginAndVectors): boolean Test origin and vectors for isAlmostEqual with other  
normalX(): number Return x component of the (normalized!) {vectorU CROSS vectorV}.  
normalY(): number Return y component of the (normalized!) {vectorU CROSS vectorV}.  
normalZ(): number Return z component of the (normalized!) {vectorU CROSS vectorV}.  
normalizeInPlace(): boolean Normalize both vectorU and vectorV in place.  
projectPointToPlane(spacePoint: Point3d, result?: Point3d): Point3d Return the projection of spacePoint onto the plane.  
setFromJSON(json?: any): void Set coordinates from a json object such as {origin: [1,2,3], vectorU:[4,5,6], vectorV[3,2,1]}  
setOriginAndVectors(origin: Point3d, vectorU: Vector3d, vectorV: Vector3d): Plane3dByOriginAndVectors Set all origin and both vectors from coordinates in given origin and vectors.  
setOriginAndVectorsXYZ(x0: number, y0: number, z0: number, ux: number, uy: number, uz: number, vx: number, vy: number, vz: number): Plane3dByOriginAndVectors Set all origin and both vectors from direct numeric parameters  
toJSON(): any Convert an Angle to a JSON object.  
toRigidFrame(result?: Transform): undefined | Transform Create a rigid frame (i.e.  
transformInPlace(transform: Transform): void Apply the transform to the origin and vectors in place  
unitNormal(result?: Vector3d): undefined | Vector3d Return (if possible) a unit normal to the plane.  
unitNormalRay(result?: Ray3d): undefined | Ray3d Return (if possible) a ray with origin at plane origin, direction as unit normal to the plane  
velocity(xyzVector: Readonly<WritableXYAndZ>): number Return signed projection of the input vector to the plane normal.  
velocityXYZ(x: number, y: number, z: number): number Return signed projection of the input vector to the plane normal.  
weightedAltitude(xyzw: Point4d): number Return triple product of homogeneous difference {(xyzw - w * origin)} with vectorU and vectorV.  
createCapture(origin: Point3d, vectorU: Vector3d, vectorV: Vector3d, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Static Capture origin and directions in a new plane.  
createFrom(source: Plane3d, result?: Plane3dByOriginAndVectors): undefined | Plane3dByOriginAndVectors Static Create a new Plane3dByOriginAndVectors from a variety of plane types.  
createFromTransformColumnsXYAndLengths(transform: Transform, xLength: undefined | number, yLength: undefined | number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Static Return a Plane3dByOriginAndVectors, with  
createOriginAndTargets(origin: Point3d, targetU: Point3d, targetV: Point3d, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Static Define a plane by three points in the plane.  
createOriginAndVectors(origin: Point3d, vectorU: Vector3d, vectorV: Vector3d, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Static Create a new plane from origin and 2 in-plane vectors.  
createOriginAndVectorsArrays(origin: Float64Array, vectorU: Float64Array, vectorV: Float64Array, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Static Create a plane from data presented as Float64Arrays.  
createOriginAndVectorsWeightedArrays(originW: Float64Array, vectorUw: Float64Array, vectorVw: Float64Array, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Static Create a plane from data presented as Float64Array with weights  
createOriginAndVectorsXYZ(x0: number, y0: number, z0: number, ux: number, uy: number, uz: number, vx: number, vy: number, vz: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Static Create a new plane from direct numeric parameters  
createXYPlane(result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Static Create a plane with origin at 000, unit vectorU in x direction, and unit vectorV in the y direction.  
fromJSON(json?: any): Plane3dByOriginAndVectors Static Create a new plane.  

Inherited methods

Name Inherited from Description
classifyAltitude(point: Point3d, tolerance: number = Geometry.smallMetricDistance): | "1" | "-1" Plane3d Return a value -1, 0, 1 giving a signed indicator of whether the toleranced altitude of the point is
classifyAltitudeXYZ(x: number, y: number, z: number, tolerance: number = Geometry.smallMetricDistance): | "1" | "-1" Plane3d Return a value -1, 0, 1 giving a signed indicator of whether the toleranced altitude of x,y,z is
isPointInPlane(spacePoint: Point3d, tolerance: number = Geometry.smallMetricDistance): boolean Plane3d Returns true if spacePoint is within distance tolerance of the plane.

Properties

Name Type Description
origin Point3d Origin of plane grid  
vectorU Vector3d u direction in plane grid  
vectorV Vector3d v direction in plane grid  

Defined in

Last Updated: 18 April, 2024