|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jreality.tutorial.misc.NonEuclideanExample
public class NonEuclideanExample
This class provides a simple example of using the non-euclidean features of jReality.
It is seemingly more complex than most of the other tutorial examples since the built-in ViewerApp application has features which are implicitly euclidean and can't be easily changed.
The idea is to construct 3 different versions of the same scene: the unit disk plus a small sphere centered at the origin. Additionally, unit normals are displayed on the polygonal mesh representing the unit disk. One can see from the size of the mesh polygons and the behavior of the normals, that the three geometries have different qualities.
The code shows what parts of the scene graph have to be changed if you want to work with
non-euclidean geometry. See the update()
method.
The standard tools RotateTool
and DraggingTool
have been used here; they
are adequate (but not perfect) when it comes to handling non-euclidean metric.
The example also uses a FlyTool
class which behaves better with non-euclidean metric than
the tool provided in the standard distribution FlyTool
.
To shift from one metric to the next type the '1' key. The order cycles through euclidean -- elliptic -- hyperbolic.
Constructor Summary | |
---|---|
NonEuclideanExample()
|
Method Summary | |
---|---|
void |
doIt()
|
static void |
main(String[] args)
|
SceneGraphComponent |
makeWorld()
create the scene graph which will be the content of the demo |
void |
update()
Update the scene graph (generally as a result of changed metric This involves: resetting the near/far clipping planes making the correct branch of the scene graph visible resetting the transformation of the world, the camera node, and the light node turning on the OpenGL shader for then non-euclidean cases making the hyperbolic boundary sphere visible if the metric is ... |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NonEuclideanExample()
Method Detail |
---|
public static void main(String[] args)
public void doIt()
public SceneGraphComponent makeWorld()
public void update()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |