#include "GT_GEOPackedSphere.h"
using namespace HDK_Sample;
namespace
{
{
public:
PackedCollect(
, myBoxes(geometry, true)
, myUseLOD(GT_RefineParms::getPackedViewportLOD(parms))
{
}
{
if (myUseLOD)
{
}
}
bool myUseLOD;
};
}
void
{
new GT_GEOPackedSphere(id);
}
{
bind(id);
}
GT_GEOPackedSphere::~GT_GEOPackedSphere()
{
}
{
return new PackedCollect(g, parms);
}
{
PackedCollect *
c = data->
asPointer<PackedCollect>();
switch (lod)
{
{
packed->getUntransformedBounds(box);
packed->getFullTransform4(m4d);
c->myBoxes.appendCentroid(box, m4d,
packed->getMapOffset(),
packed->getVertexOffset(0),
packed->getPointOffset(0));
else
c->myBoxes.appendBox(box, m4d,
packed->getMapOffset(),
packed->getVertexOffset(0),
packed->getPointOffset(0));
}
default:
break;
}
#ifdef USE_INSTANCING
c->myPrimOffsets.append(packed->getMapOffset());
#else
offsets.
append(packed->getMapOffset());
return makeInstance(g, offsets);
#endif
}
{
PackedCollect *c = data->
asPointer<PackedCollect>();
#ifdef USE_INSTANCING
if(c->myPrimOffsets.entries() > 0)
ph = makeInstance(g, c->myPrimOffsets);
if(c->myBoxes.getPrimitive())
{
if(ph)
{
collect->appendPrimitive(ph);
collect->appendPrimitive(c->myBoxes.getPrimitive());
ph = collect;
}
else
ph = c->myBoxes.getPrimitive();
}
return ph;
#else
return c->myBoxes.getPrimitive();
#endif
}
{
for(
int i=0; i<offsets.
entries(); i++)
{
if(!geo)
}
th->setTransforms(transforms);
uniform = geometry->getPrimitiveVertexAttributes(
filter,offsets, verts,
detail = geometry->getDetailAttributes(filter, true);
}