List of usage examples for javax.media.j3d View setFrontClipDistance
public void setFrontClipDistance(double distance)
From source file:SwingTest.java
/** * Create a Java 3D View and attach it to a ViewPlatform *///w w w .j ava2 s. c o m protected View createView(ViewPlatform vp) { View view = new View(); PhysicalBody pb = createPhysicalBody(); PhysicalEnvironment pe = createPhysicalEnvironment(); view.setPhysicalEnvironment(pe); view.setPhysicalBody(pb); if (vp != null) view.attachViewPlatform(vp); view.setBackClipDistance(getBackClipDistance()); view.setFrontClipDistance(getFrontClipDistance()); // create the visible canvas Canvas3D c3d = createCanvas3D(false); view.addCanvas3D(c3d); // create the off screen canvas view.addCanvas3D(createOffscreenCanvas3D()); // add the visible canvas to a component addCanvas3D(c3d); return view; }
From source file:MixedTest.java
protected View createView(ViewPlatform vp) { View view = new View(); PhysicalBody pb = createPhysicalBody(); PhysicalEnvironment pe = createPhysicalEnvironment(); AudioDevice audioDevice = createAudioDevice(pe); if (audioDevice != null) { pe.setAudioDevice(audioDevice);/*from ww w . ja v a 2 s.c o m*/ audioDevice.initialize(); } view.setPhysicalEnvironment(pe); view.setPhysicalBody(pb); if (vp != null) view.attachViewPlatform(vp); view.setBackClipDistance(getBackClipDistance()); view.setFrontClipDistance(getFrontClipDistance()); Canvas3D c3d = createCanvas3D(); view.addCanvas3D(c3d); addCanvas3D(c3d); return view; }