示例建模:作者:Thomas Funkhouser
目前我正在研究这篇研究论文“通过示例建模”的一部分,
现在有很多问题。因此,如果有人了解这篇论文,那么这里急需帮助。
我正在使用 java opengl 进行编程。
首先是我正在尝试画一笔。例如:5*100 像素描边。 我如何使用鼠标绘制它。目前我使用 gl_line_strip 绘制。它只给出了该行中所有点的 x,y 坐标。但我想要的是笔画覆盖的区域中的所有点。
感谢您的帮助...
currently Im working on a portion on this research paper "modeling by example"
Have tonnes of problems now.So if anyone has knowledge on this paper, help is badly needed here.
I am using java opengl for the programming.
first of is that I am trying to draw a stroke. eg: 5*100 pixels stroke.
How do I draw that using the mouse.Currently I draw using gl_line_strip. Which only gives me the x,y coordinates of all the points in the line. But what I want is all the points in the area covered by the stroke.
Thanks for the help...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想找到 2D 曲线绘制的像素,我建议使用模板缓冲区。您可以在绘制线带之前清除它,然后使用 glReadPixels 检索它。您将需要扫描图像,但这将为您提供线条绘制命令触及的所有像素。
If you want to find the pixels drawn by your 2D curve, I would recommend using the stencil buffer. You clear it before drawing your line strip and then retrieve it using glReadPixels. You will need to scan through the image, but this will give you all pixels touched by the line drawing command.