groimp-platform:3d:visualization
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
groimp-platform:3d:visualization [2024/11/06 16:27] – [Instantiation rules] gaetan | groimp-platform:3d:visualization [2024/11/06 16:49] (current) – [Project graph visitation] gaetan | ||
---|---|---|---|
Line 7: | Line 7: | ||
===== Project graph visitation ===== | ===== Project graph visitation ===== | ||
- | To be displayed in the 3d scene, the project graph is visited by a DisplayVisitor (whose most common implementations are WFVisitor for the Wireframe view, and GLVisitor for the OpenGL 1 view). From the root, each Node with a Successor or Branch edge is visited. All nodes connected with other types of edges are ignored. | + | To be displayed in the 3d scene, the project graph is visited by a **DisplayVisitor** (whose most common implementations are WFVisitor for the Wireframe view, and GLVisitor for the OpenGL 1 view). From the root, each Node with a **Successor** or **Branch** edge is visited. All nodes connected with other types of edges are ignored. |
- | Additionally, | + | Additionally, |
The DisplayVisitor goes through Nodes stacking their local transformation. Thus, the global transformation of an Object in the 3d scene, is the combination of all local transformations of all its parents (in the successor/ | The DisplayVisitor goes through Nodes stacking their local transformation. Thus, the global transformation of an Object in the 3d scene, is the combination of all local transformations of all its parents (in the successor/ | ||
+ | All GroIMP **module** extends **Null**. | ||
+ | |||
+ | See more: | ||
+ | * [[3d-guide: | ||
+ | * [[3d-guide: | ||
+ | * [[groimp-platform: | ||
===== Instantiation rules ===== | ===== Instantiation rules ===== | ||
- | If a Node have a [[tutorials: | + | If a Node have a [[tutorials: |
<code java> | <code java> | ||
module A extends Cylinder ==> Sphere; | module A extends Cylinder ==> Sphere; | ||
</ | </ | ||
+ | |||
+ | Produced geometry: | ||
+ | |||
+ | {{: | ||
+ | |||
But instantiation rules are not included in the graph and do not modify the stack of local transformation. | But instantiation rules are not included in the graph and do not modify the stack of local transformation. | ||
- | Yet, they have their own stack. Thus, within an instantiation rule the 3d geometry shapes follow same local transformation concept. E.g. the following code | + | Yet, they have their own stack. Thus, within an instantiation rule the 3d geometry shapes follow same local transformation concept. |
+ | |||
+ | E.g. the following code will display a Sphere on top of a Cylinder. | ||
<code java> | <code java> | ||
- | module A ==> | + | module A ==> Cylinder Sphere; |
</ | </ | ||
+ | |||
+ | Produced geometry: | ||
+ | |||
+ | {{: |
groimp-platform/3d/visualization.1730906865.txt.gz · Last modified: 2024/11/06 16:27 by gaetan