jnoon1 Posted April 28, 2019 Share Posted April 28, 2019 Hi everyone! I'm looking to access arbitrary point positions by point number. I was hoping to not have to iterate as I only want to access points 0,13,56 for example. Does anyone have any suggestions. I was thinking of just creating my own GA_Offset but I couldn't figure out how to create and edit one without using the helper functions like GA_FOR_ALL_PTOFF. Thanks for the help! Quote Link to comment Share on other sites More sharing options...
symek Posted April 28, 2019 Share Posted April 28, 2019 Something like: const std::array<GA_Index,3> interesting_points = {0,13,56}; for (const auto & point_index: interesting_points) { assert(point_index < gdp->getNumPoints()); GA_Offset point_offset = gdp->pointOffset(point_index); UT_Vector3 pos = gdp->getPos3(point_offset); // ... do something with pos } It doesn't have to be inside a loop ofc. Quote Link to comment Share on other sites More sharing options...
jnoon1 Posted April 28, 2019 Author Share Posted April 28, 2019 Thank you for the help! 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.