Public Member Functions | Protected Attributes

CC3NodeArraySequencer Class Reference

An CC3NodeArraySequencer is a type of CC3NodeSequencer that arranges nodes into an array, and groups the nodes in the array by some criteria. More...

#import <CC3NodeSequencer.h>

Inheritance diagram for CC3NodeArraySequencer:
CC3NodeSequencer CC3MeshNodeArraySequencer CC3MeshNodeArraySequencerGroupMeshes CC3MeshNodeArraySequencerGroupTextures

List of all members.

Public Member Functions

(BOOL) - shouldInsertNode:between:and:

Protected Attributes

NSMutableArray * nodes

Detailed Description

When a node is added, it is first evaluated by the contained evaluator. If it is accepted, the sequencer iterates through the existing nodes that it holds, invoking the template method shouldInsertNode:between:and: on each pair of sequential existing nodes, looking for the place to insert the new node. The node is inserted the first time that template method returns YES. If not suitable insertion point is found, the node is added to the end of the array.

This base class simply arranges the nodes in the order they are presented, by always adding to the end of the contained array of nodes. Subclasses will customize the way that the nodes are ordered and grouped in the array.


Member Function Documentation

+ (id) sequencerAcceptingAllLocalContentNodes

Allocates and initializes an autoreleased instance that accepts only nodes that have local content to draw, and orders them in the order they are added.

+ (id) sequencerAcceptingOpaqueNodes

Allocates and initializes an autoreleased instance that accepts only nodes that have local content to draw and are opaque, and orders them in the order they are added.

- (BOOL) shouldInsertNode: (CC3Node *)  aNode
between: (CC3Node *)  leftNode
and: (CC3Node *)  rightNode 

Attempts to insert the specified node between two specified nodes that already exist in the array, and returns whether it was inserted at that location.

This default implementation always returns NO, resulting in each node always being added to the end of the array.


Member Data Documentation

- (NSMutableArray*) nodes [protected]

An array of the nodes that have been added to this sequencer, ordered as this sequencer defines.

Implements CC3NodeSequencer.


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