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
andvectorV
)- 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.
- Hence these are cartesian distances.
- If numerous calls to these are expected, the repeated normalization may be a performance issue.
- Using a Plane3dByOriginAndUnitNormal or the rigid transform returned by toRigidFrame would provide better performance.
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 |
|
normalizeInPlace(): boolean | Normalize both vectorU and vectorV in place. |
|
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}. | |
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: number, yLength: 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: numberGeometry.smallMetricDistance): "-1" | "0" | "1" Inherited | 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: numberGeometry.smallMetricDistance): "-1" | "0" | "1" Inherited | 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: numberGeometry.smallMetricDistance): boolean Inherited | 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: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.