protected void GenerateVertexOffsets( float left,
float right,
float top,
float bottom,
float width,
float height,
ref Vector3 x,
ref Vector3 y,
Vector3[] destVec )
{
Vector3 vLeftOff, vRightOff, vTopOff, vBottomOff;
/* Calculate default offsets. Scale the axes by
parametric offset and dimensions, ready to be added to
positions.
*/
vLeftOff = x * ( left * width );
vRightOff = x * ( right * width );
vTopOff = y * ( top * height );
vBottomOff = y * ( bottom * height );
// Make final offsets to vertex positions
destVec[ 0 ] = vLeftOff + vTopOff;
destVec[ 1 ] = vRightOff + vTopOff;
destVec[ 2 ] = vLeftOff + vBottomOff;
destVec[ 3 ] = vRightOff + vBottomOff;
}