从3D三角网格的高效创建和存储轮廓线

发布于 2025-02-08 00:06:59 字数 220 浏览 3 评论 0原文

我需要在3D三角网格的指定范围内生成多个轮廓。要简单地生成Z坐标指定的高度点的点,我创建一个平面VEC4(0,0,1,Z),然后循环遍及网格中的所有三角形,从平面相交三角形的每个边缘上的相交。此作品并返回一组具有Z =高度的点,包括重复点。 对于密集的网格,点数很大。 关于存储,我使用二进制树来保持轨道高度z,并使用简单的向量存储点。

如何改善这种幼稚的实施? 哪些数据结构可用于存储与特定高度Z相对应的点集?

I need to generate multiple contours in a specified range from a 3D Triangular Mesh. To simply generate points at height specified by the z coordinate I create a plane vec4(0,0,1,z) then loop through all the triangles in the mesh,eliminate a number of triangles by checking height against individual AABB and perform line-plane intersection on each edge of the triangle.This works and returns a set of points having z = height including duplicate points.
For dense meshes the number of points is quite large.
Regarding storage, I use a binary tree to keep track height z and the points are stored using a simple vector.

How do I improve this naive implementation ?
What data structure can be used to store set of points corresponding to a specific height z?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文