User Tools

Site Tools


01_user_documentation:06_graph:04_visitor:02_instantiation

Instantiation

Instantiations are additional transient “sub-graphs” that can be resolved by a visitor. The most common example of instantiation is the additional 3D shapes added to a Node when it is represented in the 3D scene. The objects created in the instantiation are linked to the Node who have declare that instantiation. (For instance, the raytracing consider all shapes from a Node instantiation to be the Node - thus the node get absorbed light include the shapes).

Instantiations are not connected to the data graph. Thus, they are not included in queries.

Visitors are testing Node for instantiation by checking if they can provide an instantiator. The method used is:

public de.grogra.graph.Instantiator getInstantiator(){
   // return the instantiator.
}

The only requirement for the instantiator object is to implements the interface Instantiator and the method: boolean instantiate (ArrayPath path, Visitor v);.

01_user_documentation/06_graph/04_visitor/02_instantiation.txt · Last modified: 2025/09/05 14:54 by gaetan