// --- SIMULATION CONFIGURATION ---
import {ComputeShader, StorageBuffer} from '@babylonjs/core';

export interface ClothConfig {
  gridWidth: number;
  gridHeight: number;
  spacing: number;
  density: number;
  numVertices: number;
  particleInvMass: number;
}

// --- RAW CPU DATA ---
export interface ClothData {
  positions: Float32Array;
  prevPositions: Float32Array;
  velocities: Float32Array;
  constraints: number[][]; // Array containing the 4 phases
  params: Float32Array;
}

// --- WEBGPU BUFFERS ---
export interface ClothBuffers {
  positions: StorageBuffer;
  prevPositions: StorageBuffer;
  velocities: StorageBuffer;
  params: StorageBuffer;
  constraints: StorageBuffer[]; // 4 phase buffers
}

// --- COMPUTE PIPELINES ---
export interface ClothPipelines {
  integrate: ComputeShader;
  solvers: ComputeShader[]; // 4 solve shaders
  velocity: ComputeShader;
}
