lisux Posted December 5, 2013 Share Posted December 5, 2013 Hello. I have a detail and I want to copy all points, the trivial slution is obviously to iterate through all points and add them top the GEO_Point array. One easy optimization is to make the loop multithread and copy the points in pages. But I was wondering if there is any function in the HDK to batch copy blocks of points from a detail into an array. Something similar to a memcopy wher you copy a block of data. Thanks. P Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted December 5, 2013 Share Posted December 5, 2013 From documentation: "To be able to start removing problematic legacy structures and behaviour from the HDK, many functions are now deprecated, including anything with GEO_Point, GEO_Vertex, GEO_AttributeHandle, or GEO_PrimList in the signature." What you want to do? Quote Link to comment Share on other sites More sharing options...
lisux Posted December 5, 2013 Author Share Posted December 5, 2013 From documentation: "To be able to start removing problematic legacy structures and behaviour from the HDK, many functions are now deprecated, including anything with GEO_Point, GEO_Vertex, GEO_AttributeHandle, or GEO_PrimList in the signature." What you want to do? Nope sorry, I didn't explain myself correctly, I want to dump the P attribute for all points into a GA_Attribute array, for motion blur in a procedural. Quote Link to comment Share on other sites More sharing options...
graham Posted December 5, 2013 Share Posted December 5, 2013 Use GA_Detail::getPos3AsArray() to get all the positions in an array. You can then use that to set a deformation blur attribute from the array. Quote Link to comment Share on other sites More sharing options...
lisux Posted December 6, 2013 Author Share Posted December 6, 2013 Use GA_Detail::getPos3AsArray() to get all the positions in an array. You can then use that to set a deformation blur attribute from the array. Thanks Graham, very useful, I'll give it a try. I'm just wondering if you have millions of points, the copy into the array will use threads or it will just loop through all points? 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.