private BranchGroup createRootBranch(){

		BranchGroup rootGroup = new BranchGroup();
		BranchGroup cubeGroup = new BranchGroup();
		TransformGroup transGroup = new TransformGroup();

        transGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
        transGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
		
		int Voxel = 0;
		while(Voxel <= 99){
			if((XData.getOrigin(Voxel) != XData.getBase(Voxel) && YData.getOrigin(Voxel) != YData.getBase(Voxel) && ZData.getOrigin(Voxel) != ZData.getBase(Voxel)) || XData.getForceExport(Voxel)){
				Cubes cube = new Cubes(Voxel, XData, YData, ZData);

				Material mat = new Material();
				mat.setAmbientColor(0.3f, 0.3f, 0.3f);
				mat.setDiffuseColor(0.7f, 0.7f, 0.7f);
				mat.setSpecularColor(0.7f, 0.7f, 0.7f);
				
				Appearance app = new Appearance();
				ColoringAttributes colourApp = new ColoringAttributes();
				colourApp.setShadeModel(ColoringAttributes.SHADE_GOURAUD);
				app.setColoringAttributes(colourApp);
				app.setMaterial(mat);
				cube.setAppearance(app);

				cubeGroup.addChild(cube);
			}
			Voxel++;
		}


		bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 100.0); 
		Color3f alColour = new Color3f(0.6f, 0.6f, 0.7f);
		AmbientLight aLgt = new AmbientLight(alColour);
		aLgt.setInfluencingBounds(bounds);

		Color3f LightColour = new Color3f(1.0f, 1.0f, 1.0f);
		Vector3f LightDirection = new Vector3f(1.0f, 10.0f, 1.0f);

		DirectionalLight DirLight = new DirectionalLight(LightColour, LightDirection);
		DirLight.setInfluencingBounds(bounds);

		rootGroup.addChild(DirLight);
		rootGroup.addChild(aLgt);
		rootGroup.addChild(cubeGroup);

		TransformGroup tg = new TransformGroup();
		
		behavior = new OrbitBehavior();
		behavior.setSchedulingBounds(bounds);
		
		KeyBeh = new KeyNavigatorBehavior(transGroup);
		KeyBeh.setSchedulingBounds(new BoundingSphere(new Point3d(), 1000.0));

		transGroup.addChild(KeyBeh);
		
		view.setViewPlatformBehavior(behavior);
		
		Background bg = new Background();
		bg.setColor(new Color3f(0.0f, 1.0f, 0.0f));
		rootGroup.addChild(bg);
		
		rootGroup.addChild(transGroup);
		rootGroup.compile();
		return rootGroup;

	}