Instance Method


Gets the minimum and maximum corner points of the object’s bounding box.



- (BOOL)getBoundingBoxMin:(SCNVector3 *)min max:(SCNVector3 *)max;



On output, the minimum coordinates of the bounding box.


On output, the maximum coordinates of the bounding box.

Return Value

YES if the object has a nonzero volume; otherwise, NO.


Scene Kit defines a bounding box in the local coordinate space using two points identifying its corners, which implicitly determine six axis-aligned planes marking its limits. For example, if a geometry’s bounding box has the minimum corner {-1, 0, 2} and the maximum corner {3, 4, 5}, all points in the geometry’s vertex data have an x-coordinate value between -1.0 and 3.0, inclusive.

The coordinates provided by this method are valid only if the object has a volume to be measured. If called on a geometry containing no vertex data or a node containing no geometry (and whose child nodes, if any, contain no geometry), this method returns NO, indicating that the values *min and *max are undefined.

See Also

Measuring an Object’s Bounding Volume

- getBoundingSphereCenter:radius:

Gets the center point and radius of the object’s bounding sphere.