import com.sun.j3d.utils.geometry.*;
import com.sun.j3d.utils.universe.*;
import javax.media.j3d.*;
import javax.vecmath.*;
public class game0821{
game0821(){
SimpleUniverse univ = new SimpleUniverse();
BranchGroup group = new BranchGroup();
group.addChild(new ColorCube(0.3));
Color3f lightc = new Color3f(1.8f, 0.1f, 0.1f);
BoundingSphere bounds =
new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
Vector3f lightd = new Vector3f(4.0f, -7.0f, -12.0f);
DirectionalLight light= new DirectionalLight(lightc, lightd);
light.setInfluencingBounds(bounds);
group.addChild(light);
univ.getViewingPlatform().setNominalViewingTransform();
univ.addBranchGraph(group);
}
public static void main( String[] args ) {
new game0821();
}
}
最終更新:2011年03月01日 20:09