csg

Anti-Aliasing issue with MSAA, drawing CSG with depth and FBO

浪子不回头ぞ 提交于 2019-12-08 19:21:10
问题 I have reimplemented OpenCSG for modern OpenGL version. PixelFormatAttributes: NSOpenGLPFAColorSize , 24 , NSOpenGLPFAAlphaSize , 8 , NSOpenGLPFADepthSize , 32 , NSOpenGLPFAStencilSize , 8 , NSOpenGLPFAAccelerated , NSOpenGLPFADoubleBuffer , NSOpenGLPFASupersample , NSOpenGLPFASampleBuffers, 1 , NSOpenGLPFASamples , 4 , FBO specs: (tried render to FBO with multisample, but lines getting more strong and visible, look on screenshot at bottom) - created texture with power of 2, GL_RGBA (tried GL

How to convert a MeshView to a CSG object using JCSG library in JavaFX

落花浮王杯 提交于 2019-12-05 15:01:15
I'm using the JCSG library for JavaFX. I have some MeshView objects that I want to convert them into CSG objects, is there a way to achieve this? The easiest way to combine a javafx.scene.shape.Mesh object with a CSG one, providing you have a TriangleMesh is converting the triangular faces to polygons ( eu.mihosoft.vrl.v3d.Polygon ). Once you have a CSG object you can perform the regular operations on it, and then you can export it back to a MeshView for instance. The problem with primitive shapes ( Box , Sphere , ...) is that you don't have access to their TriangleMesh . So you can go to F(X

CSG Modeling in OpenGL

纵饮孤独 提交于 2019-12-04 06:34:08
问题 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. 回答1: Nicol Bolas is correct - OpenGL will not help with CSG, it only provides a way to draw

Bezier clipping

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 01:32:42
I'm trying to find/make an algorithm to compute the intersection (a new filled object) of two arbitrary filled 2D objects. The objects are defined using either lines or cubic beziers and may have holes or self-intersect. I'm aware of several existing algorithms doing the same with polygons, listed here . However, I'd like to support beziers without subdividing them into polygons, and the output should have roughly the same control points as the input in areas where there are no intersections. This is for an interactive program to do some CSG but the clipping doesn't need to be real-time. I've

Bezier clipping

荒凉一梦 提交于 2019-11-27 16:04:12
问题 I'm trying to find/make an algorithm to compute the intersection (a new filled object) of two arbitrary filled 2D objects. The objects are defined using either lines or cubic beziers and may have holes or self-intersect. I'm aware of several existing algorithms doing the same with polygons, listed here. However, I'd like to support beziers without subdividing them into polygons, and the output should have roughly the same control points as the input in areas where there are no intersections.