User Tools

Site Tools


01_user_documentation:03_interacting_with_groimp:05_project:01_structure:02_graph

This is an old revision of the document!


Project graph

The current state of the project graph. It is an XML file as well. It is a slightly more complete version of the graph you can see in the 2D graph panel. It contains all roots of the project. Usually, there are only two:

  1. The main graph: it is the graph built by the queries, rules, and objects insertions. This is the graph manipulated by the user.
  2. The meta graph: A graph containing additional meta information. For instance it includes the resources nodes (e.g. shaders).

Note that despite being called both graph, they are more sub-graph of the project graph.

The minimal content of the graph is:

<?xml version="1.0" encoding="UTF-8"?>
<graph xmlns="http://grogra.de/xmlpersistence" xmlns:gx="http://grogra.de/xmlpersistence"/>

The first line is the required xml description. The second contains the main tag of the file: <graph/>. It also needs to define the xmlns attributes used by GroIMP to load the content described in the file.

An actual graph (with only the rggroot) can look like:

<?xml version="1.0" encoding="UTF-8"?><graph xmlns="http://grogra.de/xmlpersistence" xmlns:gx="http://grogra.de/xmlpersistence">
 
<!-- The first root: the meta graph -->
 <node root="MetaGraph" id="1" type="de.grogra.graph.impl.Node">
  <data gx:name="extentIndex" gx:value="7"/>
  <node id="29" type="Model" edges="+">
   <data gx:name="extentIndex" gx:value="7"/>
   <object gx:name="initialTurtleState" color="14" length="100.0" diameter="0.1" tropism="0.0" parameter="0.0" carbon="0.0" heartwood="0.0" internodeCount="0"/>
  </node>
 </node>
 
<!-- The second root -->
 <node root="MainGraph" id="0" type="de.grogra.graph.impl.Node">
  <data gx:name="extentIndex" gx:value="7"/>
  <node id="21" type="de.grogra.rgg.RGGRoot" edges="+"/>
 </node>
</graph>

Notice that, with this representation, successor edges are implicitly described. The first node under another <node/> tag is seen as the successor. Additional edges would be added as <edge/> tags.

01_user_documentation/03_interacting_with_groimp/05_project/01_structure/02_graph.1748016539.txt.gz · Last modified: 2025/05/23 18:08 by sophiewachtel