Instance Property

sourceObject

The object that was used to create the shape.

Declaration

@property(readonly, nonatomic) id sourceObject;

Discussion

This property, along with the transforms and options properties, provides the information that was used to create the shape. You can use this information, for example, to draw editing or debugging UI in your scene.

  • If the shape was created with the shapeWithGeometry:options: method, the source object is an SCNGeometry object, and the options property contains the options affecting the shape’s construction from that geometry.

  • If the shape was created with the shapeWithNode:options: method, the source object is an SCNNode object, and the options property contains the options affecting the shape’s construction from that node.

  • If the shape was created with the shapeWithShapes:transforms: method, the source object is an array of SCNPhysicsShape objects and the transforms property describes how those shapes combine to form a compound shape.

See Also

Getting Information About a Shape

options

The options dictionary that was used to create the shape.

transforms

The array of transforms that was used to create a compound shape.