davidktw
Arch-Supremacy Member
- Joined
- Apr 15, 2010
- Messages
- 13,546
- Reaction score
- 1,299
I was thinking whether to store them into array first,because need to cross references,then store them into half-edge
3d - Loading a model into a half-edge data structure from a .PLY file - Stack Overflow
perhaps this is related to the ply model?
it says something like using a mark method to ensure that it was already visited,i recalled I learnt before a mark method to check if it is visited.
the problem is how to cross-reference,
flipcode | Daily Game Development | Programming 3D Games and Graphics
it will read the vertex first,
then read the face,
but face normal vertex to do calculation of normal,
in between need to store in the mesh data structure
after that vertex normal need faces.
It is up to you how to want to construct the Half Edge Graph. Of course you can choose to use temporary data structures before constructing the actual Half Edge Mesh. You can always store the raw input data in simple data structure, after which you can construct the HE Mesh using these raw data. There is definitely more than 1 way to do the same thing. It's up to you to go and explore these methods and see which one is better. You won't get the best method until you try out at least one. Understand the difficulties in getting to your final objective. Don't expect best method or best approach, they only exist after you know what you are going through. Go through the process.
As for the marking process, that's normally an approach to stop loops in searching algorithm. As your HE Mesh has a "next" property that stores the next HE, then during searching you may need a marking algorithm or data structure to know if all the edges in a Face you are traversing has been visited. I'm not sure how you are manipulating or traversing your HE Mesh, so I can't advise much.
PLY Model or any other model is just input file format, it shouldn't be too much of a concern to your HE Mesh, just how you are consuming input data.
I really think you need to have deeper thoughts in what you are doing. I find you are either going in circles, or don't exactly know what you want and what to ask. Please be more specific in what you are trying to achieve. Don't ask big broad questions, it tend to stray in answers. Ask something more specific, like what you did, what you are doing now, what are you trying to achieve, what is the exact problem you encounter. Show codes, show examples, should diagrams to let others help you.