createDirectionalScale MethodStatic
Create a matrix that scales along a specified direction
. This means if you multiply the returned matrix
by a vector
, you get directional scale
of that vector
. Suppose plane
is the plane perpendicular
to the direction
. When scale = 0, directional scale
is projection of the vector
to the plane
.
When scale = 1, directional scale
is the vector
itself. When scale = -1, directional scale
is
mirror of the vector
across the plane
. In general, When scale != 0, the result is computed by first
projecting the vector
to the plane
, then translating that projection along the direction
(if scale > 0)
or in opposite direction (if scale < 0).
- Visualization can be found at itwinjs.org/sandbox/SaeedTorabi/DirectionalScale
createDirectionalScale(direction: Vector3d, scale: number, result?: Matrix3d): Matrix3d
Parameter | Type | Description |
---|---|---|
direction | Vector3d | |
scale | number | |
result | Matrix3d |
Returns - Matrix3d
Defined in
- geometry3d/Matrix3d.ts Line 1637
Last Updated: 21 November, 2024