I try to implement my little CAD and wondering how to organize data for Bezier cubic surface primitives. My primitieves, for example a box, will contain six cubic Bezie patches, which constructes apartelly each other by own data for convenience. Any patch has 16 points. My primitieves will stitched for any iteraction (selecting points): for example any point on edge of patches will share own position with correspondong point of neighbor patches. I could delete duplicated points, but for rendering and updating primitieves I need remain the data untouched and the same time I need robust mouse picking algorithm which pick this points on edges and let move the one point together with corresponding points of neighbor patches. And I think I have two options:
- Organizing data as std::multimap or something else where a few points will take linking through keys, but here I'll have problems with searching the points.
- Improving the picking algorithm which provide picking 2-3 points as the one point, but I think it's a bad solution.
What is an common way to solve this problem? Thanks for any advice.
نویسنده : استخدام کار بازدید : 13 تاريخ : دوشنبه
1396 ساعت: 16:28