void Initialize( uint[] data, int? width, byte? alphaTolerance, float? hullTolerance, bool? holeDetection, bool? multipartDetection,
bool? pixelOffsetOptimization, Matrix? transform )
{
if( data != null && !width.HasValue )
throw new ArgumentNullException( nameof( width ), "'width' can't be null if 'data' is set." );
if( data == null && width.HasValue )
throw new ArgumentNullException( nameof( data ), "'data' can't be null if 'width' is set." );
if( data != null && width.HasValue )
setTextureData( data, width.Value );
if( alphaTolerance.HasValue )
this.alphaTolerance = alphaTolerance.Value;
else
this.alphaTolerance = 20;
if( hullTolerance.HasValue )
this.hullTolerance = hullTolerance.Value;
else
this.hullTolerance = 1.5f;
if( holeDetection.HasValue )
this.holeDetection = holeDetection.Value;
else
this.holeDetection = false;
if( multipartDetection.HasValue )
this.multipartDetection = multipartDetection.Value;
else
this.multipartDetection = false;
if( pixelOffsetOptimization.HasValue )
this.pixelOffsetOptimization = pixelOffsetOptimization.Value;
else
this.pixelOffsetOptimization = false;
if( transform.HasValue )
this.transform = transform.Value;
else
this.transform = Matrix.Identity;
}