Class ExtractMidpoint
Object
ExtractMidpoint
Extracts a
Point3i representing the mid-point of an ObjectWithProperties.
The midpoint is taken, in order of preference:
- From a property with key "midpointInt", if it exists.
- From the center-of-gravity of the
ObjectMask.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic Point3imidpoint(ObjectWithProperties object, boolean suppressZ) Calculates the midpoint ofobject.
-
Method Details
-
midpoint
Calculates the midpoint ofobject.- Parameters:
object- the object to calculate a midpoint for, possibly containing a property with key "midpointInt".suppressZ- when true, the z-dimension is ignored, and the midpoint will always havez==0. when false, it is included in the calculation.- Returns:
- the midpoint.
-