C4 Engine
C4 Engine API Documentation

Node::PreprocessNode

Defined in:  C4Node.h
Performs any preprocessing that a node needs to do before being used in a world.
Prototype

virtual void PreprocessNode(void);

Description
The PreprocessNode function performs any preprocessing that a node needs to do before being used in a world. Whenever a node is added to a scene, it should subsequently be preprocessed. Calling the Node::AppendNewSubnode function to add a node to a scene is equivalent to calling Tree::AppendSubnode and following it with a call to PreprocessNode.

When the PreprocessNode function is called for a node, it internally causes all of the subnodes of that node to be preprocessed as well. If a node has a controller, then the Controller::PreprocessController function is called before the subnodes are preprocessed.

The effects of calling the PreprocessNode function can be reversed by calling the Node::NeutralizeNode function. It is not necessary to call the NeutralizeNode function before deleting a node, but it should be called for any node that will be removed from the scene without being deleted.

Whenever a subclass implements an override for the PreprocessNode function, it should always call the PreprocessNode function of its direct base class first.
See Also

Node::NeutralizeNode

Node::AppendNewSubnode

World::AddNewNode