Game Development Reference
In-Depth Information
As shown in Figure 7-2 , the left part of the editor contains a tree view of the scene graph; in the middle part, the
scene is rendered and updated live when you change parameters in the inspector on the right side.
Figure 7-2. Scene view editor
It is worth mentioning that this editing should be used only to “finalize” a scene. The original file from the
authoring tool should always be preserved in order to regenerate the original COLLADA file if needed.
The Scene Kit API
The following sections present an overview of how to use the Scene Kit API.
COLLADA Scene Import
The Scene Kit API supports COLLADA assets exclusively, but the API isn't strictly tied to COLLADA and looks generic
enough to support other kinds of assets in the future. This section covers the usage of the SCNSceneSource class, which
implements the following features:
Loading a COLLADA scene
Extraction of COLLADA library entries
As an aside, readers familiar with OS X SDK will find the API to load COLLADA scenes similar to the ImageIO API
to load images.
Loading a COLLADA Scene
The most straightforward way to import a COLLADA scene is to use the following method, which returns a new
SCNScene instance:
+ (SCNScene *)sceneWithURL:(NSURL *)url options:(NSDictionary *)options error:(NSError **)error;
Using SCNSceneSource is required to access more information such as progress updates.
 
Search WWH ::




Custom Search