using namespace HDK_Sample;
void
{
"hdk_surface",
"Surface",
1,
1,
0));
}
PRM_Name(
"buildpolysoup",
"Build Polygon Soup"),
};
};
{
}
{
}
SOP_Surface::~SOP_Surface() {}
{
const float iso = ISO(t);
const bool makepolysoup = BUILDPOLYSOUP(t);
{
}
if (vol)
{
int rx, ry, rz;
for (
int z = 0;
z < rz;
z++)
{
for (
int y = 0;
y < ry;
y++)
{
for (
int x = 0;
x < rx;
x++)
{
bool isless = false;
bool ismore = false;
for (int d = 0; d < 8; d++)
{
density[d] = vox->getValue(
x + ((d>>0) & 1),
density[d] -= iso;
if (density[d] < 0.0)
isless = true;
else
ismore = true;
}
if (isless && ismore)
{
surfacer.addCell(
x,
y,
z, density, 0);
}
}
}
}
}
}
const char *
{
return "Geometry to Surface";
}