SCNAssimpScene Class Reference
Inherits from | SCNScene |
---|---|
Declared in | SCNAssimpScene.h SCNAssimpScene.m |
Overview
A scene graph—a hierarchy of nodes with attached geometries, lights, cameras and other attributes that together form a displayable 3D scene.
This scene graph is generated by parsing a scene graph that represents a file loaded with the assimp library.
SCNScene objects
modelScene
The scene representing the mdoel and the optional skeleton.
@property (readonly, nonatomic) SCNScene *modelScene
Discussion
The scene representing the mdoel and the optional skeleton.
Declared In
SCNAssimpScene.h
animationScenes
The array of scenes where each scene is a skeletal animation.
@property (readonly, nonatomic) NSDictionary *animationScenes
Discussion
The array of scenes where each scene is a skeletal animation.
Declared In
SCNAssimpScene.h
Animation data
skeletonNode
The root of the skeleton.
@property (readwrite, nonatomic) SCNNode *skeletonNode
Discussion
The root of the skeleton.
Declared In
SCNAssimpScene.h
animations
The dictionary of SCNAssimpAnimation objects, for each animation in the scene.
@property (readonly, nonatomic) NSMutableDictionary *animations
Discussion
The dictionary of SCNAssimpAnimation objects, for each animation in the scene.
Declared In
SCNAssimpScene.h
Creating a new scene animation
– init
Creates a new scene animation, without any animation data.
- (id)init
Return Value
A new scene animation object.
Discussion
Creates a new scene animation, without any animation data.
Declared In
SCNAssimpScene.h
Add, fetch SCNAssimpAnimation animations
– animationForKey:
Return the SCNAssimpAnimation object for the specified animation key.
- (SCNAssimpAnimation *)animationForKey:(NSString *)key
Parameters
key |
The unique scene animation key. |
---|
Return Value
The scene animation object.
Discussion
Return the SCNAssimpAnimation object for the specified animation key.
Declared In
SCNAssimpScene.h
– addAnimation:toScene:
Adds an SCNAssimpAnimation object to the given scene.
- (void)addAnimation:(SCNAssimpAnimation *)assimpAnimation toScene:(SCNScene *)animScene
Parameters
assimpAnimation |
The scene animation object created from the animation data. |
---|---|
animScene |
The scene to which the animation object is added. |
Discussion
Adds an SCNAssimpAnimation object to the given scene.
Declared In
SCNAssimpScene.m
Add, fetch scene animations
– animationKeys
Return the keys for all the animations in this file.
- (NSArray *)animationKeys
Return Value
The array of animation keys.
Discussion
Return the keys for all the animations in this file.
Declared In
SCNAssimpScene.h
– animationSceneForKey:
Return the SCNScene object for the specified animation key.
- (SCNScene *)animationSceneForKey:(NSString *)key
Parameters
key |
The unique scene animation key. |
---|
Return Value
The scene animation object.
Discussion
Return the SCNScene object for the specified animation key.
Declared In
SCNAssimpScene.h
– makeModelScene
Makes the SCNScene representing the model and the optional skeleton.
- (void)makeModelScene
Discussion
Makes the SCNScene representing the model and the optional skeleton.
This transformation to SCNScene allows the client to use the existing SCNScene API. This also makes it trivial to support serialization using the existing SCNScene export API, thereby allowing easy integration in the XCode Scene editor and the asset pipeline.
Declared In
SCNAssimpScene.h
– makeAnimationScenes
Makes an array of SCNScene objects, each SCNScene representing a skeletal animation.
- (void)makeAnimationScenes
Discussion
Makes an array of SCNScene objects, each SCNScene representing a skeletal animation.
This transformation to SCNScene allows the client to use the existing SCNScene API. This also makes it trivial to support serialization using the existing SCNScene export API, thereby allowing easy integration in the XCode Scene editor and the asset pipeline.
Declared In
SCNAssimpScene.h