Add PolytopeIntersector #1246
Replies: 3 comments 1 reply
-
Thanks for sharing this work. I have done a first pass review but don't have the time to do a full review right now. What license do you intend for the work? How you feel about adopting MIT and for it being used as a basis for PolytopeIntersector support in the core VSG? |
Beta Was this translation helpful? Give feedback.
-
This week I have been working on a vsg::PolytopeIntersector class, the work isn't yet functional but is getting there: https://github.com/vsg-dev/VulkanSceneGraph/tree/PolytopeIntersector For now it just does testing whether vertices are within the polytope like your code does, but my plan is to generalize it to handle cases where triangle and line segments have vertices outside the polytope but span the polytope. This requires successive clipping of traingles/line segments to the polytope's half spaces. I haven't yet implemented the PolytopeIntersector::Intersection side either but this should be checked in soon. Another difference is that I've introduced a vsg::PrimitiveFunctor class to help with decomposing the draw and drawIndexed calls into triangles, lines and points based on the VkPrimitiveTopology, which should make it easier for us to handle triangle strips, line strips etc. |
Beta Was this translation helpful? Give feedback.
-
Hello Robert,This class is now able to determine whether a point is inside a polyhedron or not, and it can also snap a line segment even if its two vertices are not inside the polyhedron; There are already classes for triangular patches that you have written, and vulkan for triangular patch primitives are many types, and perhaps you can simplify it. Recently I tried new features like osgutil::tessellator,Do you think VSG needs it.I'll continue to submit my code to the forum later if needed. Cheers Robert (~‾▿‾)~
…---Original---
From: "Robert ***@***.***>
Date: Fri, Sep 27, 2024 22:14 PM
To: ***@***.***>;
Cc: "Zhiyong ***@***.******@***.***>;
Subject: Re: [vsg-dev/VulkanSceneGraph] Add PolytopeIntersector (Discussion#1246)
This week I have been working on a vsg::PolytopeIntersector class, the work isn't yet functional but is getting there:
https://github.com/vsg-dev/VulkanSceneGraph/tree/PolytopeIntersector
For now it just does testing whether vertices are within the polytope like your code does, but my plan is to generalize it to handle cases where triangle and line segments have vertices outside the polytope but span the polytope. This requires successive clipping of traingles/line segments to the polytope's half spaces.
I haven't yet implemented the PolytopeIntersector::Intersection side either but this should be checked in soon.
Another difference is that I've introduced a vsg::PrimitiveFunctor class to help with decomposing the draw and drawIndexed calls into triangles, lines and points based on the VkPrimitiveTopology, which should make it easier for us to handle triangle strips, line strips etc.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi Robert,I have also completed the testing of PolytopeIntersector, which performs well in point and line snapping. As for triangulation, I think there is already a LineIntersector. Of course, the version used is Vsg1.1.0. Of course, I don't think it will affect the merger to the current 1.1.7, because it only uses Plane, Matrix and visitor.https://github.com/zhuzhiyong8679/vsg_polytope.git
Beta Was this translation helpful? Give feedback.
All reactions