Daniel Posted May 23, 2007 Share Posted May 23, 2007 This should be simple, just can't find the right thing in the hdk. I have a gdp that's simply a cloud of points. I want to build triangles based using those existing points. I have all the point indice info I need to do it, I just can't find the class/method I need. I see the GU_PolyKnit, that may do it.. but it I can't get it to work.. I'm guessing it's something I'm doing wrong since I'm just guessing at the data it needs (the .h file isn't very descriptive) I know how to make new poly's with new verts.. but I want to use my existing points Thanks for any pointers d Quote Link to comment Share on other sites More sharing options...
davedjohnson Posted May 23, 2007 Share Posted May 23, 2007 I believe that you create a new polygon (I can't remember how) then set the vertices to the points with prim->setVertex(i, pointNum); but this is not clear I'm sure. Dave Quote Link to comment Share on other sites More sharing options...
Daniel Posted May 23, 2007 Author Share Posted May 23, 2007 (edited) I believe that you create a new polygon (I can't remember how) then set the vertices to the points with prim->setVertex(i, pointNum); but this is not clear I'm sure. Dave Thanks Dave, just enough info to get me on the right track. I knew I could do poly = GU_PrimPoly::build(gdp, 3, GU_POLY_CLOSED); poly->getVertex(0).getPt()->getPos() = pos; I didn't realize I could add a prim without any verts like: poly = GU_PrimPoly::build(gdp, 0, GU_POLY_CLOSED); poly->appendVertex(gdp->points()[index0]); poly->appendVertex(gdp->points()[index1]); poly->appendVertex(gdp->points()[index2]); Anyway, that works. Thanks d Edited May 23, 2007 by Daniel 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.