protected void SetPrimitiveShapeParams(ISceneChildEntity part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte fudge)
{
ObjectShapePacket.ObjectDataBlock shapeBlock = SetPrimitiveBlockShapeParams(part, holeshape, cut, hollow, twist);
// profile/path swapped for a sphere
shapeBlock.PathBegin = shapeBlock.ProfileBegin;
shapeBlock.PathEnd = shapeBlock.ProfileEnd;
shapeBlock.ProfileCurve += fudge;
shapeBlock.PathScaleX = 100;
shapeBlock.PathScaleY = 100;
if (dimple.x < 0f)
{
dimple.x = 0f;
}
if (dimple.x > 1f)
{
dimple.x = 1f;
}
if (dimple.y < 0f)
{
dimple.y = 0f;
}
if (dimple.y > 1f)
{
dimple.y = 1f;
}
if (dimple.y - cut.x < 0.05f)
{
dimple.x = cut.y - 0.05f;
}
shapeBlock.ProfileBegin = (ushort)(50000 * dimple.x);
shapeBlock.ProfileEnd = (ushort)(50000 * (1 - dimple.y));
part.Shape.SculptEntry = false;
part.UpdateShape(shapeBlock);
}