Skip to main content

Function: calculateInteractiveImeasureCropRegion()

calculateInteractiveImeasureCropRegion(worldBasePoints, voxelToWorldAffine): TIMeasureCropRegion

Defined in: src/math/cropping.ts:61

Computes base interactive crop region from 1+ world-space points.

Parameters​

worldBasePoints​

Point3[]

Initial world-space interaction points.

voxelToWorldAffine​

mat4

Affine that maps voxel coordinates to world coordinates.

Returns​

TIMeasureCropRegion

Crop region including center, voxel planes, and edge lengths.

Remarks​

Center and base span strategy by point count:

  • 1 point: center at click, minimum crop dimensions.
  • 2 points: midpoint center, point-to-point distance as base span.
  • 3+ points: centroid center, twice max centroid distance as base span.