Table of Contents

Method IsEquivalentUnderTransformsAndTranslation

Namespace
Gamelogic.Grids2
Assembly
Gamelogic.Grids2.dll

IsEquivalentUnderTransformsAndTranslation<TPoint>(IEnumerable<TPoint>, IEnumerable<TPoint>, IEnumerable<Func<TPoint, TPoint>>, Func<IEnumerable<TPoint>, IEnumerable<TPoint>>)

Applies a function to the shapes and then checks if the results are equivalent.

public static bool IsEquivalentUnderTransformsAndTranslation<TPoint>(IEnumerable<TPoint> shape1, IEnumerable<TPoint> shape2, IEnumerable<Func<TPoint, TPoint>> pointTransformations, Func<IEnumerable<TPoint>, IEnumerable<TPoint>> toCanonicalPosition)

Parameters

shape1 IEnumerable<TPoint>

List of points of the shape1.

shape2 IEnumerable<TPoint>

List of points of the shape2.

pointTransformations IEnumerable<Func<TPoint, TPoint>>

List of transformed points.

toCanonicalPosition Func<IEnumerable<TPoint>, IEnumerable<TPoint>>

This function is used to translate the points of the shapes.

Returns

bool

Type Parameters

TPoint

The type of point of the shapes.