User Tools

Site Tools


01_user_documentation:06_graph:06_extent:02_index

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:06_extent:02_index [2025/10/13 09:45] gaetan01_user_documentation:06_graph:06_extent:02_index [2025/10/13 10:18] (current) gaetan
Line 1: Line 1:
 ====== Index ====== ====== Index ======
- 
  
 An extent collects its nodes not by a single list, but by a number of (doubly linked) lists. Currently, 16 lists are used, but this can easily be changed. This feature is used to partition the extents. The 16 lists are called the extent indexes. An extent collects its nodes not by a single list, but by a number of (doubly linked) lists. Currently, 16 lists are used, but this can easily be changed. This feature is used to partition the extents. The 16 lists are called the extent indexes.
  
-The extent indexes are defined from 0 to 15By default most nodes added to the graph are added with the index 0. There are two exceptions:  +Extents are used by the [[:01_user_documentation:07_rgg_xl:03_query_graph|query graph]] to access the nodes of the graphIn this process, nodes can be "hidden" to queries by being on a extent index non visible by the query scope (see [[:01_user_documentation:07_rgg_xl:02_xl:03_query:08_extent_visibility|RGG's extent index visibility]]). Non visible nodes are not visited and "ignored" by the queries, they are not visited at all (thus, efficient to speed up queries). For the RGG model graph, queries use only the seven first indexes by default. The default index usage is: 
-  - //meta objects//Nodes of the [[:01_user_documentation:06_graph:03_graphs:01_project_graph:02_meta_graph|meta graph]] (e.g. shaders). Added at index 7. +  * to 6: Default visibility - used by default in queriesOnly these indexes are visible by default. 
-  //GUI inserted objects//: Nodes inserted from the GUIAdded at index 6 (since GroIMP 2.1.5, they where added to index 7 before) (only the first node is added at index 6. The following ones are added at index 0).+  * 7Meta data index.  
 +  * 8: [[:01_user_documentation:06_graph:03_graphs:01_project_graph:03_type_graph|Type graph]] data used for the multi-scales. 
 +  * 9 to 15: Unused indexes - non visible by default
  
-The most common example of extent index is the //meta-graph//Each project in GroIMP includes //meta-graph// with at least one node per compiled file in the project. Yet, these Nodes are not returned by default in XL queries. The reason is that, they were added to an invisible (by default) extent index.+**Note:** the index visibility is not used for the displayThus, nodes on "non" visible index are still displayed in the 3d view.
  
-**Note**: before GroIMP version 2.1.5, all objects added through the GUI>objects>insert> ... where also added on the extent index 7. Thus, not queriable by default. E.g. If you inserted a Plane in the scene, it was not reachable by default queries. In GroIMP version 2.1.5 their extent index have been changed to 6.  
  
-An index is visible, if it is included in the queries. A Node can be added in the scene with a geometrical representation, and still be in an invisible index. By default only the 7th first indexes are visible (0 to 6). The last index (7) is not visible.+===== Default usage =====
  
-It is possible to change the index visibility in a project with the method''setVisibleExtents(int )'' on the RGGGraph.+The extent indexes are defined from 0 to 15. By default most nodes added to the graph are added with the index 0. There are three exceptions 
 +  - The roots of the graphs are added at index 7. 
 +  - //meta objects//: Nodes of the [[:01_user_documentation:06_graph:03_graphs:01_project_graph:02_meta_graph|meta graph]] (e.g. shaders). Added at index 7. 
 +  - //GUI inserted objects//: Nodes inserted from the GUI. Added at index 6 (since GroIMP 2.1.5, they where added to index 7 before) (only the first node is added at index 6. The following ones are added at index 0).
  
-=== Example === 
  
-For instance, let's consider the following method in an empty project. Notice that we set the visible extent value to 1:+The most common example of extent index is the //meta-graph//. Each project in GroIMP includes a //meta-graph// with at least one node per compiled file in the project. Yet, these Nodes are not returned by default in XL queries. The reason is that, they were added to an invisible (by default) extent index.
  
-<code java> +**Note**: before GroIMP version 2.1.5, all objects added through the GUI>objects>insert> ... where also added on the extent index 7Thusnot queriable by defaultE.gIf you inserted Plane in the sceneit was not reachable by default queriesIn GroIMP version 2.1.5 their extent index have been changed to 6
-public void run(){ +
-de.grogra.rgg.model.Runtime.INSTANCE.currentGraph().setVisibleExtents(1); +
-println((*Node*)); +
-+
-</code> +
- +
-The method output: +
-<code> +
-de.grogra.rgg.RGGRoot[id=99]@2e86af42 +
-de.grogra.rgg.Axiom[id=100]@59f1c976 +
-</code> +
- +
-Only the "normal" nodes are visible.  +
- +
-Let's change the visible extent value to **255**. Now the method output: +
-<code> +
-de.grogra.graph.impl.Node[id=0]@5add4889 +
-de.grogra.graph.impl.Node[id=1]@4f690d55 +
-de.grogra.rgg.RGGRoot[id=103]@621de1a6 +
-Model[id=101]@331e288e +
-parameters[id=102]@cd97a89 +
-de.grogra.rgg.Axiom[id=104]@4cface1f +
-</code> +
- +
-Some additional nodes are now visible: +
-  * the roots (id 0 and 1)id 0 is the root of the main graph. id 1 is the root of the meta graph. +
-  * the nodes from the meta graph: the compiled version of the files: Modeland parameters. +
- +
-Notice that: +
-  * Once the setVisibleExtents is calledThe value remains until a new value is set +
-  * setVisibleExtents use as parameter the decimal value of binary number of 8 values where each 1 mean that the index is visiblethe 0 to 7 index visibility are defined from left to rightE.gto have all indexes visible, we use 11111111 (eight 1), which is equal in decimal to 255. To have all indexes visible except for the 1rst one, we use 11111110 (=254). The default value is 01111111 (=127).+
  
01_user_documentation/06_graph/06_extent/02_index.1760341510.txt.gz · Last modified: 2025/10/13 09:45 by gaetan