/// <summary> /// Rotate the vertices with the defined value in radians. /// </summary> /// <param name="value">The amount to rotate by in radians.</param> public void Rotate(float value) { FMatrix rotationMatrix; FMatrix.CreateRotationZ(value, out rotationMatrix); for (int i = 0; i < Count; i++) { this[i] = FVector2.Transform(this[i], rotationMatrix); } }
public void Transform(FMatrix transform) { // Transform main polygon for (int i = 0; i < this.Count; i++) { this[i] = FVector2.Transform(this[i], transform); } // Transform holes FVector2[] temp = null; if (_holes != null && _holes.Count > 0) { for (int i = 0; i < _holes.Count; i++) { temp = _holes[i].ToArray(); FVector2.Transform(temp, ref transform, temp); _holes[i] = new Vertices(temp); } } }
public static void TransformNormal(ref FVector3 normal, ref FMatrix matrix, out FVector3 result) { result = new FVector3((normal.X * matrix.M11) + (normal.Y * matrix.M21) + (normal.Z * matrix.M31), (normal.X * matrix.M12) + (normal.Y * matrix.M22) + (normal.Z * matrix.M32), (normal.X * matrix.M13) + (normal.Y * matrix.M23) + (normal.Z * matrix.M33)); }
public static FVector3 TransformNormal(FVector3 normal, FMatrix matrix) { TransformNormal(ref normal, ref matrix, out normal); return(normal); }
public static void TransformNormal(FVector3[] sourceArray, int sourceIndex, ref FMatrix matrix, FVector3[] destinationArray, int destinationIndex, int length) { throw new NotImplementedException(); }
public static void TransformNormal(FVector3[] sourceArray, ref FMatrix matrix, FVector3[] destinationArray) { throw new NotImplementedException(); }
public static FVector3 Transform(FVector3 position, FMatrix matrix) { Transform(ref position, ref matrix, out position); return(position); }
public static void TransformNormal(ref FVector2 normal, ref FMatrix matrix, out FVector2 result) { result = new FVector2((normal.X * matrix.M11) + (normal.Y * matrix.M21), (normal.X * matrix.M12) + (normal.Y * matrix.M22)); }
public static void Transform(ref FVector2 position, ref FMatrix matrix, out FVector2 result) { result = new FVector2((position.X * matrix.M11) + (position.Y * matrix.M21) + matrix.M41, (position.X * matrix.M12) + (position.Y * matrix.M22) + matrix.M42); }