The boundingBox property for MDLVoxelArray contains nonsensical values.

Originator:iosdeveloperzone
Number:rdar://26489479 Date Originated:26-May-2016 01:35 AM
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 9.x
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
The `minBounds` field of the `boundingBox` property of `MDLVoxelArray` holds nonsensical values.

Steps to Reproduce:
Open the attached playground

Expected Results:
The bounds of a 1x2x3 box should, after conversion to voxels, be roughly equal to the original bounding box expanded by about half the voxel dimension.

Actual Results:
Original asset bounds: min:(-0.5, -1.0, -1.5) max:(0.5, 1.0, 1.5)
voxelArray.boundingBox min:(-3.30828, -3.30828, -3.30828) max:(0.622759, 1.03655, 1.65724)

Notice the min values are all equal and are not related (in any obvious way) to the input geometry.

If the voxels are enumerated and  a bounding box calculated the result is:
Calculated bounding box = min:(-0.618621, -1.03241, -1.6531) max:(0.622759, 1.03655, 1.65724)

Regression:
Occurs on iOS 9.x and OS X 10.11.x

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!