using Unity.Jobs;
using Unity.Collections;
using Unity.Mathematics;
namespace UnityEngine.U2D
{
///
/// Custom Post Processing after geometry is generated.
///
public abstract class SpriteShapeGeometryCreator : ScriptableObject
{
///
/// Get size of the vertices to be allocated for the Job. This is also used to determine the number of indices needed.
/// Current implementaiton only allows 1 vertex to be mapped to 1 index thus the index array will have the same length as the vertex array.
///
/// SpriteShapeController of the GameObject.
///
public abstract int GetVertexArrayCount(SpriteShapeController spriteShapeController);
///
/// Create SpriteShape Geometry.
///
/// SpriteShapeController of the GameObject.
/// Indices of generated geometry. Initialize to max Array count and contains default data.
/// Position of vertices in generated geometry. Initialize to max Array count and contains default data.
/// Texture Coordinates of vertices in generated geometry. Initialize to max Array count and contains default data.
/// Tangent of vertices in generated geometry. Initialize to max Array count and contains default data.
/// Submeshes in generated geometry. Initialize to max Array count and contains default data.
/// Points that define the path of Collider.
///
public abstract JobHandle MakeCreatorJob(SpriteShapeController spriteShapeController, NativeArray indices,
NativeSlice positions, NativeSlice texCoords, NativeSlice tangents,
NativeArray segments, NativeArray colliderData);
///
/// Get Versioning so we can check if geometry needs to be generated.
///
///
public virtual int GetVersion() => GetInstanceID();
}
};