2

我一直在尝试使 Java 3D 中的表面以类似于镜子的方式反射。API 说要在 SPHERE_MAP 模式下使用 TexCoordGeneration,但它似乎根本没有任何区别。谁能发现我做错了什么?

Appearance reflectAp = new Appearance();
TexCoordGeneration tex = new TexCoordGeneration();
tex.setGenMode(TexCoordGeneration.SPHERE_MAP);

reflectAp.setMaterial(matFact.silver());
reflectAp.setTexCoordGeneration(tex);

flat = new Box(.7f, .9f, .01f, Primitive.GENERATE_NORMALS | Primitive.GENERATE_TEXTURE_COORDS, reflectAp);
4

0 回答 0