#include "GUI_PolySoupBox.h"
using namespace HDK_Sample;
const char *BBOX_OPTION = "psoup_bbox";
const char *BARY_OPTION = "psoup_bary";
const int BARY_DRAW_GROUP = 0;
const int BBOX_DRAW_GROUP = 1;
{
const int priority = 0;
priority,
}
GUI_PolySoupBoxHook::GUI_PolySoupBoxHook()
{
}
GUI_PolySoupBoxHook::~GUI_PolySoupBoxHook()
{
}
{
{
return new GUI_PolySoupBox(info, cache_name, geo_prim);
}
return NULL;
}
const char *cache_name,
:
GR_Primitive(info, cache_name, GA_PrimCompat::TypeMask(0))
{
myGeometry = NULL;
}
GUI_PolySoupBox::~GUI_PolySoupBox()
{
delete myGeometry;
}
int geo_type,
{
}
void
{
{
bool new_geo = false;
if(!myGeometry)
{
new_geo = true;
}
pos(0) = barycenter;
pos.array()->data());
if(new_geo)
{
myGeometry->connectSomePrims(r, BARY_DRAW_GROUP,
const unsigned line_connect[24] = { 1,2, 2,3, 3,4, 4,1,
5,6, 6,7, 7,8, 8,5,
1,5, 2,6, 3,7, 4,8 };
myGeometry->connectIndexedPrims(r, BBOX_DRAW_GROUP,
}
}
}
void
{
{
if(!strcmp(user->
getName(), BBOX_OPTION))
{
}
else if(!strcmp(user->
getName(), BARY_OPTION))
{
}
}
}
void
{
{
}
myGeometry->draw(r, BBOX_DRAW_GROUP);
}
void
{
myGeometry->draw(r, BARY_DRAW_GROUP);
}
void
{
}
int
unsigned int pick_type,
bool has_pick_map)
{
return 0;
}