Polygon clipping with HDK

   1904   1   0
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
In documentaion I found this two function:
00804 // Polygon clipping
00805 void clip(UT_Vector3 &normal, float d = 0, int normlize = 0,
00806 const GB_PrimitiveGroup *primGroup = 0);
00807
00808 //
00809 // Polygon creasing
00810 void crease(UT_Vector3 &normal, float d = 0,
00811 int normlize = 0, int outputGroups = 0,
00812 GB_PrimitiveGroup *above = 0,
00813 GB_PrimitiveGroup *below = 0,
00814 const GB_PrimitiveGroup *creaseGroup = 0);

My code is:

OP_ERROR SOP_test::cookMySop(OP_Context &context)
{
boss = UTgetInterrupt();

if (lockInputs(context) >= UT_ERROR_ABORT)
return error();

duplicateSource(0, context);

gdp->clip(UT_Vector3(1, 0, 0));

unlockInputs();
return error();
}

like input geometry I use just default box, but nothing happen, Why???
https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
same problem here:

http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=21258&highlight=clip [sidefx.com]

so, I think that Its Bug, so tomorrow I will start programming my clip function, because this “clip” is devil :evil:
https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
  • Quick Links