Strange effect painting beautiful colored haze in the air with java3d

对着背影说爱祢 提交于 2019-12-11 02:45:06

问题


I have a strange effect that I would like to understand. Based on this https://stackoverflow.com/a/26384859 example code I changed only two lines:

// pAtt.setCullFace(PolygonAttributes.CULL_NONE); <-- old pAtt.setPolygonMode(PolygonAttributes.POLYGON_LINE); // <-- new

I was expecting to see a (colored) wire frame of the original 4 sided pyramid. But it paints a beautifully colored haze in the air while it is rotating.

Edit: this has been open as a simple question (is it a bug? / reproducible or not?) for a really long time, and now had a bounty, but still no answers.

I assume, that, java3D is really, really dead now.

I would like not only to know how this effect can be suppressed, but also if it is a bug or a reliably reproducible feature that can be put to use.

(I think of something like Speedy Gonzales leaving a color trail when running fast.)


回答1:


The face culling and the polygon mode are 2 distinct notions: glPolygonMode glCullFace

Java3D 1.6.0 uses JOGL 2. If you want to understand how Java3D works, you need to understand how computer graphics and OpenGL work. POLYGON_LINE shows only the outlined polygons, is it really what you want?

Please avoid claiming that there might be a bug before being sure that there isn't any misunderstanding of the API use.



来源:https://stackoverflow.com/questions/26802042/strange-effect-painting-beautiful-colored-haze-in-the-air-with-java3d

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!