01_user_documentation:07_rgg_xl:02_xl:10_rgg_addition:04_operator_overload:01_node
Table of Contents
Nodes
The most commonly used overload operators are applied to the Nodes.
Index
Node[Property]return the field with the given name of the node.Node[Attribute](graph attribute) return the attribute of the node. Only nodes that are part of the graph have graph attributes.Node[int]get the n-th successor of the first branch of the Node. (useless?)Node[NodeToInt]evaluate the function (NodeToInt) on the node.Node[NodeToFloat]evaluate the function (NodeToFloat) on the node.Node[NodeToDouble]evaluate the function (NodeToDouble) on the node.Node[Location]evaluate the Location of the Node. The Location object can be null.
E.g.
module A(float len) extends Sphere; protected void init()[ Axiom ==> A; ] void run(){ A a = first((*A*)); // get a A that belong to the graph. a[len]; // get the field "len" of the node a. // Attributes println( (de.grogra.vecmath.geom.Sphere) // get the VOLUME of the node a[de.grogra.imp3d.VolumeAttribute.ATTRIBUTE] ); println( (de.grogra.imp3d.objects.Sphere) // get the SHAPE of the node a[de.grogra.imp3d.objects.Attributes.SHAPE] ); // Functions a[ORDER]; // return the branching order according to the L-System definition it is a turtle state funtion. a[Location.X]; // return the global X location of a; a[Location.XYZ]; // return the global location as a Point3d }
LT, LE, GT, GE
Node > NodeNode >= NodeNode < NodeNode <= Node
All compare the IDs of the nodes.
01_user_documentation/07_rgg_xl/02_xl/10_rgg_addition/04_operator_overload/01_node.txt · Last modified: 2025/09/04 15:27 by gaetan
