/** * Creates the simplest possible scene graph. 1 Camera, 1 Layer, 1 Root * * @return a basic scene with 1 camera, layer and root */ public static PCamera createBasicScenegraph() { final PRoot root = new PRoot(); final PLayer layer = new PLayer(); final PCamera camera = new PCamera(); root.addChild(camera); root.addChild(layer); camera.addLayer(layer); return camera; }
/** * Builds the basic scene graph associated with this canvas. Developers may * override this method to install their own layers, and cameras. * * @return PCamera viewing the freshly created scene */ public PCamera createBasicSceneGraph() { final PRoot r = new PSWTRoot(this); final PLayer l = new PLayer(); final PCamera c = new PCamera(); r.addChild(c); r.addChild(l); c.addLayer(l); return c; }