Texture texture=new TextureLoader("image/texture.gif",component).getTexture(); Appearance appearance=new Appearance(); appearance.setTexture(texture); Primitive primitive=new Sphere(1.0f,Sphere.GENERATE_TEXTURE_COORDS,appearance); // Immediate Mode では primitive.getShape() の返り値の Shape3D オブジェクトで描画する
TransparencyAttributes attr=new TransparencyAttributes(); attr.setTransparency(0.5f); // 半透明 Appearance appearance=new Appearance(); appearance.setTransparencyAttributes(attr); Primitive primitive=new Sphere(1.0f,appearance); // Immediate Mode では primitive.getShape() の返り値の Shape3D オブジェクトで描画する
PolygonAttributes attr=new PolygonAttributes(); attr.setPolygonMode(PolygonAttributes.POLYGON_LINE); // ワイヤーフレームで表示 Appearance appearance=new Appearance(); appearance.setPolygonAttributes(attr); Primitive primitive=new Sphere(1.0f,appearance); // Immediate Mode では primitive.getShape() の返り値の Shape3D オブジェクトで描画する
戻る