Daniel Posted June 5, 2007 Share Posted June 5, 2007 I would think this would be straight forward, just can't find it. I have a bunch of GEO_Vertex stored and I'd like to find out what face a vertex belongs to (if any). This isn't possible with GEO_Point since it could be a list of faces.. but with a vertex I'm guessing it's either none or 1. I can't find a method to return that given a vertex. Any thoughts? thnx d Quote Link to comment Share on other sites More sharing options...
crunch Posted June 5, 2007 Share Posted June 5, 2007 I would think this would be straight forward, just can't find it. I have a bunch of GEO_Vertex stored and I'd like to find out what face a vertex belongs to (if any). This isn't possible with GEO_Point since it could be a list of faces.. but with a vertex I'm guessing it's either none or 1. I can't find a method to return that given a vertex. Any thoughts? thnx d I don't believe that the vertex has a back-pointer to the primitive. So the only way to find it would be to search every primitive. If you're doing this a lot, you might want to build your own list of back-pointers... Quote Link to comment Share on other sites More sharing options...
rjpieke Posted June 5, 2007 Share Posted June 5, 2007 I don't believe that the vertex has a back-pointer to the primitive. So the only way to find it would be to search every primitive. Fortunately "every primitive" does not have to mean EVERY primitive. If you use a GQ_Detail to represent your geometry, you can use the FOR_QUAD_EDGE() macro to iterate over the point's shared faces to see which one actually contains the vertex. Cheers! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.