Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeySmolenchuk committed Jan 1, 2025
2 parents b44d331 + 28e8e8c commit 1eb7a80
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
7 changes: 4 additions & 3 deletions src/closest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include <GU/GU_PrimPacked.h>
#include <GEO/GEO_Detail.h>
#include <GEO/GEO_ConvertParms.h>
#include <GOP/GOP_Manager.h>

#include <map>
#include <iostream>

class closest: public RixPattern
{
Expand Down Expand Up @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion src/interpolator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <GEO/GEO_Primitive.h>

#include <map>
#include <iostream>

class interpolator: public RixPattern
{
Expand Down
1 change: 0 additions & 1 deletion src/readAttribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <GU/GU_Detail.h>

#include <map>
#include <iostream>

class readAttribute: public RixPattern
{
Expand Down
12 changes: 6 additions & 6 deletions src/samplePoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include <GU/GU_Detail.h>
#include <GU/GU_PrimPacked.h>
#include <GEO/GEO_PointTree.h>
#include <GOP/GOP_Manager.h>

#include <map>
#include <iostream>

class samplePoints: public RixPattern
{
Expand Down Expand Up @@ -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;
}
Expand All @@ -216,15 +216,15 @@ 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)
{
mem /= 1024.0;
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() );
Expand Down
1 change: 0 additions & 1 deletion src/sampleVolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <GU/GU_PrimVolume.h>

#include <map>
#include <iostream>

class sampleVolume: public RixPattern
{
Expand Down

0 comments on commit 1eb7a80

Please sign in to comment.