01_user_documentation:07_rgg_xl:02_xl:08_object:01_module:05_instantiation
This is an old revision of the document!
Instantiation
A module can declare an instantiation which will be used by default for its 3D representation. The syntax for the instantiation declaration is :
module A ==> PRODUCTION ; // instantiation declaration
The module instantiation is considered as part of the module. Thus, operations that are applied to the instantiation are applied on the module. (E.g. light absorbed).
import de.grogra.rgg.model.Instantiation; module A ==> Box; // is equivalent to : class A extends Node implements de.grogra.xl.modules.Instantiator { // ... constructor & pattern // instantiation public de.grogra.graph.Instantiator getInstantiator(){ return Instantiation.INSTANTIATOR; } public void instantiate (Object p) { Instantiation producer = (Instantiation) p; producer.producer$begin(); producer.instantiate(new Box()); producer.producer$end(); } }
01_user_documentation/07_rgg_xl/02_xl/08_object/01_module/05_instantiation.1757069236.txt.gz · Last modified: 2025/09/05 12:47 by gaetan
