jinso001 Posted January 27, 2015 Share Posted January 27, 2015 In HDK 14 version, there is major changes that GU_Detail doesn't include GEO_Point anymore. Here is code in previous version function ( const GU_Detail* gdp, ~~~ ) { GEO_Point* ppt; GA_FOR_ALL_GPOINTS_( const_cast<GU_Detail *> (gdp), ppt ) { UT_Vector4 position = ppt->getPos(); ~~~~~ } } In HDK14, GU_Detail doesn't support GEO_Point anymore. How I can get the GEO_Point data from GU_Detail class in HDK 14 ? ( This code is part of tool which converts Houdini particle data to custom particle cache. ) Thanks for reading. Quote Link to comment Share on other sites More sharing options...
edward Posted January 27, 2015 Share Posted January 27, 2015 GEO_Point was pretty much deprecated in H12 when the base geometry library was rewritten. It only existed in some ultra slow backwards compatibility layer. What you want is something more like: void f(const GU_Detail* gdp, ...) { for (GA_Offset ptoff : gdp->getPointRange()) { UT_Vector3 position = gdp->getPos3(ptoff); ... } } If you don't have a sufficiently modern C++ compiler (which everyone should have), then you can replace the range-based for loop with "UTforEach(GA_Offset ptoff, gdp->getPointRange())" via #include <UT/UT_ForEach.h> Quote Link to comment Share on other sites More sharing options...
edward Posted January 27, 2015 Share Posted January 27, 2015 PS. If you're only porting old pre-H12 code now, you should first read: - http://www.sidefx.com/docs/hdk14.0/_h_d_k__g_a__porting.html - http://www.sidefx.com/docs/hdk14.0/_h_d_k__g_a__using.html Quote Link to comment Share on other sites More sharing options...
jinso001 Posted January 28, 2015 Author Share Posted January 28, 2015 Thank you for the nice tip! edward! 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.