从3D三角网格的高效创建和存储轮廓线
我需要在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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论