如何在Java 3D中绘制透明平面?
我试图在 Java 3D 中绘制一个透明平面 (X[0..100],Y[0..100],Z=0),但不知道如何绘制。 我查看了教程页面,仍然找不到任何示例程序。
我试图找到一个“平面”对象作为 BranchGroup 以添加到我现有的 TransformGroup,但没有这样的平面对象; 我应该用什么? 以及如何使其透明?
I am trying to draw a transparent plane (X[0..100],Y[0..100],Z=0) in Java 3D, but can't figure out how. I've looked on the tutorial page and still can't find any sample programs.
I am attempting to find a "plane" object as a BranchGroup to add to my existing TransformGroup, but there isn't such a plane object; what should I use? And how do I make it transparent?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是我在直方图上使用的代码片段 - 这可能适用于平面。
如果我没记错的话,关键是
TransparencyAttributes
。 我希望我能告诉你更多信息,但我现在无法编译它(缺少一些与 3D 无关的旧库)。This is a snippet of code I used on a histogram - this might work on a flat plane.
The key is the
TransparencyAttributes
if I remember correctly. I wish I could tell you more but I can't get this to compile right now (missing some old libraries that aren't related to 3D).试试这个代码...
Try this code...