Ratman Posted June 5, 2009 Share Posted June 5, 2009 Hey gang, So I recently started diving into the HDK and been reading through the examples and searching around this forum and try to piece together what i'm trying to achieved. The main question is, how can I apply a transform to a primitive object, say a box, being translated in XYZ, should be simple enough. Right now I've tried something like. FOR_ALL_PRIMITIVES(gdp, prim) { xform.translate(0.7, 2.1, 5.1); prim->transform(xform); } And various other variations, but none seem to be working right, I found a few examples here that would did work on moving the box, but they where moving each point, which isn't what I want to do, unless I didn't understand things right. The thread in question I was reading is this Any sort of help would be great, and I have read the doxygen site and not sure if GEO_Primitive is the right thing I'm looking for. Or I might just be looking at things completely wrong Thanks! Rick Quote Link to comment Share on other sites More sharing options...
edward Posted June 9, 2009 Share Posted June 9, 2009 Did you initialize xform? Try putting a xform.identity() before you call translate. 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.