Display a geometry

From JReality Wiki
Redirect page
Jump to: navigation, search

Redirect to:

It's easy to display geometries with JRViewer.


Display a geometry in JRViewer

Source file: Icosahedron

Run as Java webstart


Calling JRViewer.display(SceneGraphNode n) opens the jReality viewer and displays the Geometry or a SceneGraphComponent passed in as argument.


Some simple geometries are implemented in class de.jreality.geometry.Primitives, find an example below.


...
    JRViewer.display(Primitives.icosahedron());


Screenshot


Primitives.icosahedron()


Previous: Introduction to jReality programming Developer Tutorial: Contents Next: Developer Tutorial