User Tools

Site Tools


01_user_documentation:06_graph:04_visitor:02_instantiation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
01_user_documentation:06_graph:04_visitor:02_instantiation [2025/09/05 13:12] gaetan01_user_documentation:06_graph:04_visitor:02_instantiation [2025/09/05 14:54] (current) gaetan
Line 3: Line 3:
  
 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.  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 [[:01_user_documentation:08_light|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 [[:01_user_documentation:06_graph|data graph]]. Thus, they are not included in queries. Instantiations are not connected to the [[:01_user_documentation:06_graph|data graph]]. Thus, they are not included in queries.
 +
 +======  ======
 +
 +Visitors are testing Node for instantiation by checking if they can provide an [[https://javadoc.grogra.de/graph/de/grogra/graph/Instantiator.html|instantiator]]. The method used is:
 +<code java>
 +public de.grogra.graph.Instantiator getInstantiator(){
 +   // return the instantiator.
 +}
 +</code>
 +
 +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.1757070736.txt.gz · Last modified: 2025/09/05 13:12 by gaetan