using namespace HDK_Sample;
#define PRM_MENU_CHOICES (PRM_ChoiceListType)(PRM_CHOICELIST_EXCLUSIVE |\
PRM_CHOICELIST_REPLACE)
void
{
"proto_brushhairlen",
"Brush Hair Length",
1,
1));
}
};
};
{
1, &sop_names[1], 0, &sopOpMenu),
};
{
}
{
mySopFlags.setManagesDataIDs(true);
myRayOrient = 0.0f;
myRayHit = 0.0f;
myRayHitU = 0.0f;
myRayHitV = 0.0f;
myRayHitW = 0.0f;
myRayHitPressure = 1.0f;
myPrimHit = -1;
myUseFore = true;
myStrokeChanged = false;
}
SOP_BrushHairLen::~SOP_BrushHairLen()
{
}
{
{
}
}
void
{
int iop;
switch (op)
{
default: iop = 0; break;
}
}
void
{
}
bool
{
}
{
}
{
const bool BUILD_HAIR = false;
bool changed_input;
bool changed_group;
if (BUILD_HAIR)
{
changed_input = true;
changed_group = true;
}
else
{
if (changed_input)
}
if (attrib.isInvalid())
myHairlenFound = false;
if (myHairlenFound)
attrib.bumpDataId();
myStrokeChanged = false;
{
{
pos.
y() += attrib.get(oldptoff);
if (ptwrangler.getNumAttributes() > 0)
ptwrangler.copyAttributeValues(newptoff, oldptoff);
polygonpointnumbers(2*i ) =
int(oldptoff - relativetooffset);
polygonpointnumbers(2*i + 1) =
int(newptoff - relativetooffset);
}
}
}
void
{
if (!myHairlenFound)
{
myHairlenFound = true;
}
return;
float newhair = (myUseFore ?
FGR(myTime) :
BGR(myTime));
{
float oldhair = myHairlenHandle.
get(ptoff);
myHairlenHandle.
set(ptoff,
SYSlerp(oldhair, newhair, alpha));
}
}