/// <summary>
/// Sets the corners of the rectangle, in relative coordinates.
/// </summary>
/// <param name="left">Left position in screen relative coordinates, -1 = left edge, 1.0 = right edge.</param>
/// <param name="top">Top position in screen relative coordinates, 1 = top edge, -1 = bottom edge.</param>
/// <param name="right">Position in screen relative coordinates.</param>
/// <param name="bottom">Position in screen relative coordinates.</param>
/// <param name="updateAABB"></param>
public void SetCorners( float left, float top, float right, float bottom, bool updateAABB )
{
var data = new float[]
{
left, top, -1, left, bottom, -1, right, top, -1, // Fix for Issue #1187096
right, bottom, -1
};
var buffer = vertexData.vertexBufferBinding.GetBuffer( POSITION );
buffer.WriteData( 0, buffer.Size, data, true );
if ( updateAABB )
{
box = new AxisAlignedBox();
box.SetExtents( new Vector3( left, top, 0 ), new Vector3( right, bottom, 0 ) );
}
}