在OpenGL中进行CSG建模 [英] CSG Modeling in OpenGL
问题描述
我正在用OpenGL处理构造实体几何(CSG)建模。
我想知道如何实现二元运算。我读了一些关于 Gold Feather Algorithm 的文章,并且我知道 OpenCSG a>但是在阅读其源代码后,我发现它太复杂了。我只需要一个简单的最短的OpenGL例子来实现它。
在算法中没有限制,只要它易于实现。
CSG是一项艰巨的任务,我怀疑你会找到一种易于理解的算法
看看这个项目: http://code.google.com/p/carve/ ,它将在三角形/面上执行CSG,然后您将绘制到OpenGL上
I am dealing with Constructive Solid Geometry(CSG) modeling with OpenGL.
I want to know how to implement binary operation. I read something about Gold Feather Algorithm and I know about OpenCSG but after reading its source code, I found it too complicated to understand. I just need a simple shortest OpenGL example how to implement it.
There's no restrict in Algorithm as long as it is easy to implement.
Nicol Bolas is correct - OpenGL will not help with CSG, it only provides a way to draw 3D things onto a 2D screen. OpenCSG is essentially "fake" CSG by using using OpenGL's depthbuffers, stencils and shaders to make it appear that 3D objects have had a boolean operation performed on them.
CSG is a huge task and I doubt you will ever find an "algorithm easy to understand" Have a look at this project: http://code.google.com/p/carve/ which performs CSG on the triangles/faces which you would then draw to OpenGL
这篇关于在OpenGL中进行CSG建模的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!