toTransform Method
Populate a Transform from the instance, even if the transformations aren't equivalent.
- A Transform cannot encode perspective, but this method returns one even if it isn't equivalent to the instance.
- Compare to the asTransform property, which returns
undefined
when there is perspective.
toTransform(result?: Transform): { isValid: boolean, transform: Transform }
@returns derived Transform
and a flag indicating its validity:
transform
is filled with the top three rows of the instance's entries scaled by the reciprocal of nonzero weight; if weight is zero,transform
is set to the identity.isValid
is true if and only if the last row of the instance is essentially[000w]
for nonzerow
= weight.
@see asTransform
Parameter | Type | Description |
---|---|---|
result | Transform | optional preallocated object to populate and return. |
Returns - { isValid: boolean, transform: Transform }
derived Transform
and a flag indicating its validity:
transform
is filled with the top three rows of the instance's entries scaled by the reciprocal of nonzero weight; if weight is zero,transform
is set to the identity.isValid
is true if and only if the last row of the instance is essentially[000w]
for nonzerow
= weight.
Defined in
- geometry4d/Matrix4d.ts Line 338
Last Updated: 07 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.