Public Member Functions

CC3NodeTransformingVisitor Class Reference

CC3NodeTransformingVisitor is a CC3NodeVisitor that is passed to a node when it is visited during transformation operations. More...

#import <CC3NodeVisitor.h>

Inheritance diagram for CC3NodeTransformingVisitor:
Inheritance graph
[legend]
Collaboration diagram for CC3NodeTransformingVisitor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(void) - updateNode:

Detailed Description

CC3NodeTransformingVisitor is a CC3NodeVisitor that is passed to a node when it is visited during transformation operations.

This visitor encapsulates whether the transformation matrix needs to be recalculated. The transformation matrix needs to be recalculated if any of the node's transform properties (location, rotation, scale) have changed, or if those of an ancestor node were changed.

This visitor inherits the ability to enapsulate the CC3World, but it does not use this property. It is okay to instantiate an instance without the world.


Member Function Documentation

- (void) updateNode: (CC3Node *)  aNode

Builds the transformation matrices of the specified node and all descendent nodes.

Each node rebuilds its transformation matrix if either its own transform is dirty, or if an ancestor's transform was dirty. As it traverses the node hierarchy, this visitor keeps track of whether the transform of an ancestor node was dirty.


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