v2.0.2
Instance Methods | List of all members
CC3Node(PVRPODRez) Category Reference

#import <CC3PODResourceNode.h>

Instance Methods

(void) - addContentFromPODFile:
 
(void) - addContentFromPODFile:withName:
 
(void) - addContentFromPODResourceFile:
 
(void) - addContentFromPODResourceFile:withName:
 

Detailed Description

This category extends CC3Node to add convenience methods for loading POD content directly into the CC3Node instance, adding the extracted and configured nodes as child nodes to the CC3Node.

Method Documentation

- (void) addContentFromPODFile: (NSString *)  aFilepath

Instantiates an instance of CC3PODResourceNode, loads it from the POD file at the specified path, and adds the CC3PODResourceNode instance as a child node to this CC3Scene instance.

The specified file path may be either an absolute path, or a path relative to the application resource directory. If the file is located directly in the application resources directory, the specified file path can simply be the name of the file.

The name of the resource node will be that of the file.

If this method is being invoked from a background thread (ie- not the main rendering thread) AND this node is already part of a scene, this operation will automatically be deferred and queued onto the main operation queue, to be performed on teh main rendering thread prior to the next rendeirng cycle. This is to ensure that the node is not added while the scene is being rendered, to avoid race conditions.

In this situation, subsequent code executed on the background thread should not rely on the specified node, or any of its descendants, having been added to the receiver or the scene. For example, invoking this method on the background thread, followed by getNodeNamed: to the receiver (or any of its ancestors), will almost certainly return nil, because this method will have been deferred to the main thread, and will, almost certainly, not have been run by the time the subsequent getNodeNamed: method is run on the background thread.

Extends class CC3Node.

- (void) addContentFromPODFile: (NSString *)  aFilepath
withName: (NSString *)  aName 

Instantiates an instance of CC3PODResourceNode with the specified name, loads it from the POD file at the specified path, and adds the CC3PODResourceNode instance as a child node to this CC3Scene instance.

The specified file path may be either an absolute path, or a path relative to the application resource directory. If the file is located directly in the application resources directory, the specified file path can simply be the name of the file.

If this method is being invoked from a background thread (ie- not the main rendering thread) AND this node is already part of a scene, this operation will automatically be deferred and queued onto the main operation queue, to be performed on teh main rendering thread prior to the next rendeirng cycle. This is to ensure that the node is not added while the scene is being rendered, to avoid race conditions.

In this situation, subsequent code executed on the background thread should not rely on the specified node, or any of its descendants, having been added to the receiver or the scene. For example, invoking this method on the background thread, followed by getNodeNamed: to the receiver (or any of its ancestors), will almost certainly return nil, because this method will have been deferred to the main thread, and will, almost certainly, not have been run by the time the subsequent getNodeNamed: method is run on the background thread.

Extends class CC3Node.

- (void) addContentFromPODResourceFile: (NSString *)  __deprecated
Deprecated:
Use the addContentFromPODFile: method instead, which supports both absolute file paths and file paths that are relative to the resources directory.

Extends class CC3Node.

- (void) addContentFromPODResourceFile: (NSString *)  aRezPath
withName: (NSString *)  __deprecated 
Deprecated:
Use the addContentFromPODFile:withName: method instead, which supports both absolute file paths and file paths that are relative to the resources directory.

Extends class CC3Node.


The documentation for this category was generated from the following file: