package me.earthme.luminol.config.modules.optimizations;

import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.enums.EnumConfigCategory;

@ConfigClassInfo(category = EnumConfigCategory.OPTIMIZATIONS, name = "accelerated_collision")
public class AcceleratedCollisionConfig implements IConfigModule {
    @ConfigInfo(name = "enabled", comments = "Enable accelerated entity-collision broadphase.")
    public static boolean enabled = true;

    @ConfigInfo(name = "backend", comments = "Backend: AUTO, GPU, FFM, JAVA, VANILLA.")
    public static String backend = "FFM";

    @ConfigInfo(name = "max_collision", comments = "Maximum collision interactions per entity per tick.")
    public static int maxCollision = 32;

    @ConfigInfo(name = "grid_size", comments = "Spatial hash grid cell size in blocks.")
    public static int gridSize = 1;

    @ConfigInfo(name = "density_window", comments = "Density smoothing window in ticks.")
    public static int densityWindow = 4;

    @ConfigInfo(name = "density_threshold", comments = "Entity density threshold to activate acceleration.")
    public static int densityThreshold = 16;

    @ConfigInfo(name = "max_threads", comments = "Maximum worker threads for FFM backend. 0 = all CPUs.")
    public static int maxThreads = 1;
}
