Example usage for javax.media.j3d View attachViewPlatform

List of usage examples for javax.media.j3d View attachViewPlatform

Introduction

In this page you can find the example usage for javax.media.j3d View attachViewPlatform.

Prototype

public void attachViewPlatform(ViewPlatform vp) 

Source Link

Document

Attach viewPlatform structure to this view.

Usage

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);/* w  w  w  .  j a  va  2  s. co  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;
}