protected void GetParametricOffsets( out float left, out float right, out float top, out float bottom )
{
left = 0.0f;
right = 0.0f;
top = 0.0f;
bottom = 0.0f;
switch ( this.originType )
{
case BillboardOrigin.TopLeft:
left = 0.0f;
right = 1.0f;
top = 0.0f;
bottom = -1.0f;
break;
case BillboardOrigin.TopCenter:
left = -0.5f;
right = 0.5f;
top = 0.0f;
bottom = 1.0f;
break;
case BillboardOrigin.TopRight:
left = -1.0f;
right = 0.0f;
top = 0.0f;
bottom = -1.0f;
break;
case BillboardOrigin.CenterLeft:
left = 0.0f;
right = 1.0f;
top = 0.5f;
bottom = -0.5f;
break;
case BillboardOrigin.Center:
left = -0.5f;
right = 0.5f;
top = 0.5f;
bottom = -0.5f;
break;
case BillboardOrigin.CenterRight:
left = -1.0f;
right = 0.0f;
top = 0.5f;
bottom = -0.5f;
break;
case BillboardOrigin.BottomLeft:
left = 0.0f;
right = 1.0f;
top = 1.0f;
bottom = 0.0f;
break;
case BillboardOrigin.BottomCenter:
left = -0.5f;
right = 0.5f;
top = 1.0f;
bottom = 0.0f;
break;
case BillboardOrigin.BottomRight:
left = -1.0f;
right = 0.0f;
top = 1.0f;
bottom = 0.0f;
break;
}
}