Hice el programa para visualizar cubo 3D
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package cube3d;
/**
*
*/
import javax.media.j3d.BranchGroup;
import javax.media.j3d.Transform3D;
import javax.media.j3d.TransformGroup;
import com.sun.j3d.utils.geometry.ColorCube;
import com.sun.j3d.utils.universe.SimpleUniverse;
public class Cube3D {
public Cube3D() {
SimpleUniverse universe = new SimpleUniverse();
BranchGroup group = new BranchGroup();
ColorCube cube = new ColorCube(0.1);
TransformGroup GT = new TransformGroup();
Transform3D transform = new Transform3D();
GT.setTransform(transform);
GT.addChild(cube);
group.addChild(GT);
universe.getViewingPlatform().setNominalViewingTransform();
universe.addBranchGraph(group);
}
public static void main(String[] args) {
// TODO code application logic here
}
}
La salida muestra
run: BUILD SUCCESSFUL (total time: 0 seconds)
Pero no veo la figura. Qué puedo hacer. Ayuda