diff --git a/src/closest.cpp b/src/closest.cpp index e9a7173..97bd705 100644 --- a/src/closest.cpp +++ b/src/closest.cpp @@ -8,9 +8,9 @@ #include #include #include +#include #include -#include class closest: public RixPattern { @@ -210,10 +210,11 @@ void closest::CreateInstanceData(RixContext& ctx, convertParams.setFromType(GEO_PrimTypeCompat::GEOPRIMPOLYSOUP); gdp->convert(convertParams); - GA_PrimitiveGroup* grp = nullptr; + GOP_Manager group_manager; + const GA_PrimitiveGroup* grp = nullptr; if (!primgroup.Empty()) { - grp = gdp->findPrimitiveGroup(primgroup.CStr()); + grp = group_manager.parsePrimitiveGroups(primgroup.CStr(), GOP_Manager::GroupCreator(gdp)); if (!grp) return; } diff --git a/src/interpolator.cpp b/src/interpolator.cpp index 527172c..72421ee 100644 --- a/src/interpolator.cpp +++ b/src/interpolator.cpp @@ -7,7 +7,6 @@ #include #include -#include class interpolator: public RixPattern { diff --git a/src/readAttribute.cpp b/src/readAttribute.cpp index ebce0fc..f337559 100644 --- a/src/readAttribute.cpp +++ b/src/readAttribute.cpp @@ -6,7 +6,6 @@ #include #include -#include class readAttribute: public RixPattern { diff --git a/src/samplePoints.cpp b/src/samplePoints.cpp index e6b228c..d732eb5 100644 --- a/src/samplePoints.cpp +++ b/src/samplePoints.cpp @@ -6,9 +6,9 @@ #include #include #include +#include #include -#include class samplePoints: public RixPattern { @@ -201,11 +201,11 @@ void samplePoints::CreateInstanceData(RixContext& ctx, } } } - - GA_PointGroup* grp = nullptr; + GOP_Manager group_manager; + const GA_PointGroup* grp = nullptr; if (!pointgroup.Empty()) { - grp = gdp->findPointGroup(pointgroup.CStr()); + grp = group_manager.parsePointGroups(pointgroup.CStr(), GOP_Manager::GroupCreator(gdp)); if (!grp) return; } @@ -216,7 +216,7 @@ void samplePoints::CreateInstanceData(RixContext& ctx, data->gdp = gdp; data->tree = tree; - float mem = gdp->getMemoryUsage(true); + float mem = gdp->getMemoryUsage(true) + tree->getMemoryUsage(true); int idx = 0; while(mem>=1024) { @@ -224,7 +224,7 @@ void samplePoints::CreateInstanceData(RixContext& ctx, idx++; } constexpr const char FILE_SIZE_UNITS[4][3] {"B", "KB", "MB", "GB"}; - m_msg->Info("[hGeo::samplePoints] Loaded: %d points from %s %.1f %s (%s)", gdp->getNumPoints(), filename.CStr(), mem, FILE_SIZE_UNITS[idx], handle.CStr() ); + m_msg->Info("[hGeo::samplePoints] Loaded: %d points from %s %.1f %s (%s)", tree->entries(), filename.CStr(), mem, FILE_SIZE_UNITS[idx], handle.CStr() ); } else m_msg->Warning("[hGeo::samplePoints] Can't read file: %s (%s)", filename.CStr(), handle.CStr() ); diff --git a/src/sampleVolume.cpp b/src/sampleVolume.cpp index 458b2f3..d9045ec 100644 --- a/src/sampleVolume.cpp +++ b/src/sampleVolume.cpp @@ -6,7 +6,6 @@ #include #include -#include class sampleVolume: public RixPattern {