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
undefinedwhen there is perspective.
toTransform(result?: Transform): { isValid: boolean, transform: Transform }
@returns derived Transform and a flag indicating its validity:
transformis filled with the top three rows of the instance's entries scaled by the reciprocal of nonzero weight; if weight is zero,transformis set to the identity.isValidis 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:
transformis filled with the top three rows of the instance's entries scaled by the reciprocal of nonzero weight; if weight is zero,transformis set to the identity.isValidis 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: 28 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.