Skip to main content
GameDev.net gamedev.net
🔒 Locked

converting from vertex/face to half-edge structure

Started by Sloner Nov 13, 2006 at 5:01 PM 2 replies 2.1k views
Original Post
Sloner
Sloner
I currently have models in an x/y/z vertex table, and a vertex1/vertex2/vertex3 table. I need to convert it to a half-edge format. Does anyone know of any examples online for how to do this?
Zakwayda
Zakwayda
Quote:
Original post by Sloner
I currently have models in an x/y/z vertex table, and a vertex1/vertex2/vertex3 table. I need to convert it to a half-edge format. Does anyone know of any examples online for how to do this?
I have code for building the half-edge data for a mesh lying around somewhere, but I'd probably have a hard time digging it up at this point (I've been using a different data structure for mesh manipulation as of late).

It shouldn't be too hard to write your own code though, as it's mostly bookkeeping. Is there something in particular you're having trouble with?

Also, if you haven't already you might check out this article; the source code link is no longer good, but reading the article might give you some ideas as to how to approach an implementation.
Sloner
Sloner
Hah, I actually read that article. What happened is, I made my own half-edge file format and used it to build a couple models for an assignment, but the teacher said I have to load from the SMF format and convert it to half-edge. I just wanted to find out if there was code out there somewhere before I pulled my hair out trying to implement it.
Sloner
Sloner
I went ahead and did it myself. Not terribly complicated, though I had one relatively simple bug jamming up the works for a while. If anyone wants to see the code, let me know.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.