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:
- The main graph: it is the graph built by the queries, rules, and objects insertions. This is the graph manipulated by the user.
- 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.
