tryTransformInPlace Method

Apply a transform to the mesh data.

  • Transform the data as follows:
    • apply transform to points.
    • apply inverse transpose of transform to normals and renormalize. This preserves normals perpendicular to transformed facets, and keeps them pointing outward, e.g, if the mesh is closed. If the transform is not invertible or a normal has zero length, the normal(s) are left unchanged, and this error is silently ignored.
    • apply transform to auxData.
    • scale faceData distances by the cube root of the absolute value of the determinant of transform.matrix.
  • Note that if the transform is a mirror, this method does NOT reverse index order. This is the caller's responsibility. This base class is just a data carrier: PolyfaceData does not know if the index order has special meaning.
  • Note that this method always returns true. If transforming normals fails (due to singular matrix or zero normal), the original normal(s) are left unchanged.

tryTransformInPlace(transform: Transform): boolean

Parameter Type Description
transform Transform  

Returns - boolean

Defined in

Last Updated: 18 January, 2025