Instance Method

insertMaterial:atIndex:

Attaches a material to the geometry at the specified index.

Declaration

- (void)insertMaterial:(SCNMaterial *)material atIndex:(NSUInteger)index;

Parameters

material

The material to attach.

index

The location in the geometry’s materials array at which to add the new material.

See Also

Managing a Geometry’s Materials

materials

An array of SCNMaterial objects that determine the geometry’s appearance when rendered.

firstMaterial

The first material attached to the geometry.

- materialWithName:

Returns the first material attached to the geometry with the specified name.

- removeMaterialAtIndex:

Removes a material attached to the geometry.

- replaceMaterialAtIndex:withMaterial:

Replaces a material attached to the geometry with another.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software