| Package | sandy.core.scenegraph |
| Interface | public interface INodeOperation |
Implements the visitor design pattern: Using the visitor design pattern, you can define a new operation on Node and its subclasses without having to change the classes and without having to take care of traversing the node tree.
var mySpecialOperation:SpecialOperation = new SpecialOperation;
mySpecialOperation.someParameter = 0.8;
someTreeNode.perform(mySpecialOperation);
trace(mySpecialOperation.someResult);
mySpecialOperation.someParameter = 0.2;
someOtherTreeNode.perform(mySpecialOperation);
trace(mySpecialOperation.someResult);
| Method | Defined by | ||
|---|---|---|---|
|
performOnEntry(p_oNode:Node):void
Operation to be performed on node entry
| INodeOperation | ||
|
performOnExit(p_oNode:Node):void
Operation to be performed on node exit
| INodeOperation | ||
| performOnEntry | () | method |
public function performOnEntry(p_oNode:Node):voidOperation to be performed on node entry
Parametersp_oNode:Node — p_oNode The node the entry operation is to be performed on
|
| performOnExit | () | method |
public function performOnExit(p_oNode:Node):voidOperation to be performed on node exit
Parametersp_oNode:Node — p_oNode The node the exit operation is to be performed on
|