Name |
Description |
|
constructor(x: number = 0, y: number = 0, z: number = 0): Vector3d |
|
|
addCrossProductToTargetsInPlace(ax: number, ay: number, az: number, bx: number, by: number, bz: number, cx: number, cy: number, cz: number): void |
Accumulate a vector which is cross product vectors from origin (ax,ay,az) to targets (bx,by,bz) and (cx,cy,cz) |
|
angleFromPerpendicular(vectorB: Vector3d): Angle |
Return the (Strongly typed) angle from this vector to the plane perpendicular to planeNormal. |
|
angleTo(vectorB: Vector3d): Angle |
Return the (Strongly typed) angle from this vector to vectorB. |
|
angleToXY(vectorB: Vector3d): Angle |
Return the (Strongly typed) angle from this vector to vectorB,using only the xy parts. |
|
clone(result?: Vector3d): Vector3d |
Copy xyz from this instance to a new (or optionally reused) Vector3d |
|
crossProduct(vectorB: Vector3d, result?: Vector3d): Vector3d |
Return the cross product of this vector and vectorB. |
|
crossProductMagnitude(vectorB: XYAndZ): number |
Compute the magnitude of a cross product (without allocating a temporary vector object) |
|
crossProductMagnitudeSquared(vectorB: XYAndZ): number |
Compute the squared magnitude of a cross product (without allocating a temporary vector object) |
|
crossProductStartEnd(pointA: Point3d, pointB: Point3d, result?: Vector3d): Vector3d |
Cross product with vector from pointA to pointB |
|
crossProductStartEndXY(pointA: Point3d, pointB: Point3d): number |
Cross product (xy parts only) with vector from pointA to pointB |
|
crossProductXY(vectorB: Vector3d): number |
Return the cross product of the instance and vectorB, using only the x and y parts. |
|
crossProductXYZ(x: number, y: number, z: number, result?: Vector3d): Vector3d |
return cross product of this with the vector (x, y, z) |
|
dotProduct(vectorB: XYAndZ): number |
Return the dot product of this vector with vectorB. |
|
dotProductStart3dEnd4d(pointA: Point3d, pointB: Point4d): number |
Returns the dot product with vector (pointB - pointA * pointB.w) |
|
dotProductStartEnd(pointA: XYAndZ, pointB: XYAndZ): number |
Returns the dot product of this vector with the with vector from pointA to pointB |
|
dotProductStartEndXYZ(pointA: Point3d, x: number, y: number, z: number): number |
Dot product with vector from pointA to pointB, with pointB given as x,y,z |
|
dotProductStartEndXYZW(pointA: Point3d, x: number, y: number, z: number, w: number): number |
Dot product with vector from pointA to pointB, with pointB given as (weighted) x,y,z,w |
|
dotProductXY(vectorB: Vector3d): number |
Return the dot product of the instance and vectorB, using only the x and y parts. |
|
dotProductXYZ(x: number, y: number, z: number = 0): number |
Dot product with vector (x,y,z) |
|
fractionOfProjectionToVector(target: Vector3d, defaultFraction: number = 0): number |
Return the fractional projection of spaceVector onto this |
|
interpolate(fraction: number, vectorB: Vector3d, result?: Vector3d): Vector3d |
Return a vector computed at fractional position between this vector and vectorB |
|
isParallelTo(other: Vector3d, oppositeIsParallel: boolean = false, returnValueIfAnInputIsZeroLength: boolean = false): boolean |
Test if this vector is parallel to other. |
|
isPerpendicularTo(other: Vector3d, returnValueIfAnInputIsZeroLength: boolean = false): boolean |
Test if this vector is perpendicular to other. |
|
minus(vector: XYAndZ, result?: Vector3d): Vector3d |
Return the vector difference this - vector |
|
negate(result?: Vector3d): Vector3d |
Return a new vector with components negated from the calling instance. |
|
normalize(result?: Vector3d): Vector3d | undefined |
Return a unit vector parallel with this. |
|
normalizeInPlace(): boolean |
If this vector has nonzero length, divide by the length to change to a unit vector. |
|
normalizeWithDefault(x: number, y: number, z: number, result?: Vector3d): Vector3d |
Normalize this vector, using given xyz as default if length is zero. |
|
normalizeWithLength(result?: Vector3d): object |
Return a pair object containing (a) property v which is a unit vector in the direction |
|
planarAngleTo(vector: Vector3d, planeNormal: Vector3d): Angle |
Return the (as strongly typed Angle) Angle from this vector to vectorB. |
|
planarRadiansTo(vector: Vector3d, planeNormal: Vector3d): number |
Return the (radians as a simple number, not strongly typed Angle) radians from this vector to vectorB. |
|
plus(vector: XYAndZ, result?: Vector3d): Vector3d |
Return the vector sum this - vector |
|
plus2Scaled(vectorA: XYAndZ, scalarA: number, vectorB: XYAndZ, scalarB: number, result?: Vector3d): Vector3d |
Return the (strongly typed Vector3d) this Vector3d + vectorA * scalarA + vectorB * scalarB |
|
plus3Scaled(vectorA: XYAndZ, scalarA: number, vectorB: XYAndZ, scalarB: number, vectorC: XYAndZ, scalarC: number, result?: Vector3d): Vector3d |
Return the (strongly typed Vector3d) thisVector3d + vectorA * scalarA + vectorB * scalarB + vectorC * scalarC |
|
plusScaled(vector: XYAndZ, scaleFactor: number, result?: Vector3d): Vector3d |
Return vector + vector * scalar |
|
rotate90Around(axis: Vector3d, result?: Vector3d): Vector3d | undefined |
Rotate this vector 90 degrees around an axis vector. |
|
rotate90CCWXY(result?: Vector3d): Vector3d |
Return a vector same length as this but rotate 90 degrees CCW |
|
rotate90Towards(target: Vector3d, result?: Vector3d): Vector3d | undefined |
Return a (new or optionally preallocated) vector that is rotated 90 degrees in the plane of this vector and the target vector. |
|
rotateXY(angle: Angle, result?: Vector3d): Vector3d |
Rotate the xy parts of this vector around the z axis. |
|
safeDivideOrNull(denominator: number, result?: Vector3d): Vector3d | undefined |
Divide by denominator, but return undefined if denominator is zero. |
|
scale(scale: number, result?: Vector3d): Vector3d |
Return vector * scalar |
|
scaleToLength(length: number, result?: Vector3d): Vector3d | undefined |
Return a (optionally new or reused) vector in the direction of this but with specified length. |
|
setStartEnd(point0: XYAndZ, point1: XYAndZ): void |
Set (replace) xzz components so they are a vector from point0 to point1 |
|
signedAngleTo(vector1: Vector3d, vectorW: Vector3d): Angle |
Return the (strongly typed Angle) angle from this vector to vectorB, measured in the plane containing both, with vectorW indicating which side to view to control sign of the angle. |
|
signedRadiansTo(vector1: Vector3d, vectorW: Vector3d): number |
Return the (simple number of radians, not Strongly typed Angle) angle from this vector to vectorB, measured in the plane containing both, with vectorW indicating which side to view to control sign of the angle. |
|
sizedCrossProduct(vectorB: Vector3d, productLength: number, result?: Vector3d): Vector3d | undefined |
Compute cross product with vectorB . |
|
smallerUnorientedAngleTo(vectorB: Vector3d): Angle |
Return the smallest (strongly typed) angle from the (bidirectional) line containing this to the (bidirectional) line containing vectorB |
|
smallerUnorientedRadiansTo(vectorB: Vector3d): number |
Return the smallest angle (in radians) from the (bidirectional) line containing this to the (bidirectional) line containing vectorB |
|
tripleProduct(vectorB: Vector3d, vectorC: Vector3d): number |
Return the triple product of the instance, vectorB, and vectorC |
|
tryNormalizeInPlace(smallestMagnitude: number = Geometry.smallMetricDistance): boolean |
Try to normalize (divide by magnitude), storing the result in place. |
|
unitCrossProduct(vectorB: Vector3d, result?: Vector3d): Vector3d | undefined |
Compute the cross product of this vector with vectorB . |
|
unitCrossProductWithDefault(vectorB: Vector3d, x: number, y: number, z: number, result?: Vector3d): Vector3d |
Compute the cross product of this vector with vectorB . |
|
unitPerpendicularXY(result?: Vector3d): Vector3d |
Return a vector which is in the xy plane, perpendicular ot the xy part of this vector, and of unit length. |
|
create(x: number = 0, y: number = 0, z: number = 0, result?: Vector3d): Vector3d Static |
return a Vector3d (new or reused from optional result) |
|
createAdd2Scaled(vectorA: XYAndZ, scaleA: number, vectorB: XYAndZ, scaleB: number, result?: Vector3d): Vector3d Static |
Return the (strongly typed Vector3d) thisVector3d + vectorA * scalarA + vectorB * scalarB |
|
createAdd2ScaledXYZ(ax: number, ay: number, az: number, scaleA: number, bx: number, by: number, bz: number, scaleB: number, result?: Vector3d): Vector3d Static |
Return the (strongly typed Vector3d) thisVector3d + vectorA * scalarA + vectorB * scalarB with all components presented as numbers |
|
createAdd3Scaled(vectorA: XYAndZ, scaleA: number, vectorB: XYAndZ, scaleB: number, vectorC: XYAndZ, scaleC: number, result?: Vector3d): Vector3d Static |
Return the (strongly typed Vector3d) thisVector3d + vectorA * scaleA + vectorB * scaleB + vectorC * scaleC |
|
createCrossProduct(ux: number, uy: number, uz: number, vx: number, vy: number, vz: number, result?: Vector3d): Vector3d Static |
Create a vector which is cross product of two vectors supplied as separate arguments |
|
createCrossProductToPoints(origin: XYAndZ, pointA: XYAndZ, pointB: XYAndZ, result?: Vector3d): Vector3d Static |
Return the cross product of the vectors from origin to pointA and pointB. |
|
createFrom(data: XYAndZ | XAndY | Float64Array, result?: Vector3d): Vector3d Static |
Copy contents from another Point3d, Point2d, Vector2d, or Vector3d |
|
createPolar(r: number, theta: Angle, z?: number): Vector3d Static |
Return a vector defined by polar coordinates distance and angle from x axis |
|
createRotateVectorAroundVector(vector: Vector3d, axis: Vector3d, angle?: Angle): Vector3d | undefined Static |
Return a vector which is the input vector rotated around the axis vector. |
|
createSpherical(r: number, theta: Angle, phi: Angle): Vector3d Static |
Return a vector defined in spherical coordinates. |
|
createStartEnd(start: XYAndZ, end: XYAndZ, result?: Vector3d): Vector3d Static |
Return a vector defined by start and end points (end - start). |
|
createStartEndXYZXYZ(x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, result?: Vector3d): Vector3d Static |
Return a vector (optionally in preallocated result, otherwise newly created) from [x0,y0,z0] to [x1,y1,z1] |
|
createZero(result?: Vector3d): Vector3d Static |
Return a vector with 000 xyz parts. |
|
dotProductAsXYAndZ(dataA: XYAndZ, dataB: XYAndZ): number Static |
Return the dot product of the xyz components of two inputs that are XYAndZ but otherwise not explicitly Vector3d |
|
fromJSON(json?: XYZProps): Vector3d Static |
Convert json to Vector3d. |
|
unitX(scale: number = 1): Vector3d Static |
Return a unit X vector optionally multiplied by a scale |
|
unitY(scale: number = 1): Vector3d Static |
Return a unit Y vector |
|
unitZ(scale: number = 1): Vector3d Static |
Return a unit Z vector |
|