Instance Method

setBoundingBoxMin:max:

Sets a custom bounding box for the object.

Required.

Declaration

- (void)setBoundingBoxMin:(SCNVector3 *)min max:(SCNVector3 *)max;

Parameters

min

A pointer to the minimum coordinates of the bounding box.

max

A pointer to the maximum coordinates of the bounding box.

Discussion

You define a bounding box in the local coordinate space using two points identifying its corners, which implicitly determine six axis-aligned planes marking its limits. The x-, y-, and z-coordinate values of any point in the volume are each greater than those of the min point and less than those of the max point.

By default, Scene Kit automatically computes the bounding volumes of nodes and geometries and uses this information to assist in rendering. You use this method to override the default bounding box.