Mario Marengo Posted February 24, 2006 Share Posted February 24, 2006 Hi all, I'm having trouble finding a way to manipulate vertices and their attributes. After scanning GU_Detail and associated classes, I've noticed that GEO_Primitive is the closest I can get to a GEO_Vertex from any of the G*_Detail member functions... but at that level, all vertex-related members are pure virtual, since they're defined by the actual geo types later on. What I need to do is: add vertex attribute to detail foreach prim in detail foreach vertex in prim get connected vertices (closure) eval/assign attribute based on connected vertices end end The only part I can't find is the "foreach vertex in prim" bit, the rest I'm fine with. Thanks. Quote Link to comment Share on other sites More sharing options...
Mamoru Posted February 24, 2006 Share Posted February 24, 2006 The only part I can't find is the "foreach vertex in prim" bit, the rest I'm fine with. 25050[/snapback] for( i = 0; i < prim->getVertexCount(); i++ ) GEO_Vertex &vertex = prim->getVertex(i); Does that help? Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted February 24, 2006 Author Share Posted February 24, 2006 for( i = 0; i < prim->getVertexCount(); i++ ) GEO_Vertex &vertex = prim->getVertex(i); Does that help? Thanks, I'll give that a try when I get home. I had seen getVertexCount() defined in GB_Primitive as a pure virtual, and then not actually implemented until GEO_Hull, GEO_Face, etc, so I thought it wouldn't work from a GEO_Primitive... but now I realize we're talking about a pointer not an instance... yeah that should work. I'll give it a go. Thanks! 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.