create Java 3D Background - Java javax.media.j3d

Java examples for javax.media.j3d:Background

Description

create Java 3D Background

Demo Code

/**// w w w.  j av  a 2  s  .c  o  m
 * Copyright (c) 2014 Sa?l Pi?a <sauljabin@gmail.com>.
 * 
 * This file is part of WaspsNestBuilding.
 * 
 * WaspsNestBuilding is licensed under The MIT License.
 * For full copyright and license information please see the LICENSE file.
 */
import java.awt.Color;
import javax.media.j3d.Appearance;
import javax.media.j3d.Background;
import javax.media.j3d.BoundingSphere;
import javax.media.j3d.Material;
import javax.media.j3d.Transform3D;
import javax.media.j3d.TransformGroup;
import javax.media.j3d.TransparencyAttributes;
import javax.vecmath.Color3f;
import javax.vecmath.Vector3d;

public class Main{
    public static Background createBackground(Color color) {
        Background b = new Background(new Color3f(color));
        b.setApplicationBounds(new BoundingSphere());
        return b;
    }
}

Related Tutorials