import { VecN } from '@holotope/core'; import { type EvaluateXpbdPotentialStateNOptions, type XpbdPotentialStateEvaluationN } from './xpbd-potential-state.js'; import { XpbdParticleN } from './xpbd-world.js'; export interface PredictXpbdInertialStateNOptions { readonly dimension: number; readonly particles: readonly XpbdParticleN[]; readonly deltaTime: number; /** Constant RN gravity; defaults to zero. */ readonly gravity?: VecN | ArrayLike; } /** Non-mutating explicit prediction used as an optimization-time-step center. */ export interface XpbdInertialPredictionN { readonly dimension: number; readonly deltaTime: number; readonly positions: readonly VecN[]; readonly accelerations: readonly VecN[]; } export interface EvaluateXpbdIncrementalPotentialNOptions extends EvaluateXpbdPotentialStateNOptions { readonly deltaTime: number; /** Prescribed inertial centers paired one-to-one with `particles`. */ readonly predictedPositions: readonly VecN[]; } /** * Scaled Backward-Euler objective evidence at one RN candidate state. * * `objective = inertialObjective + deltaTime^2 * potentialEnergy`. * Gradients are restricted to free particles; fixed entries are zero. */ export interface XpbdIncrementalPotentialEvaluationN { readonly dimension: number; readonly deltaTime: number; readonly objective: number; readonly inertialObjective: number; readonly scaledConservativeObjective: number; readonly conservativePotentialEnergy: number; readonly gradients: readonly VecN[]; readonly inertialGradients: readonly VecN[]; readonly freeParticleMask: readonly boolean[]; readonly freeParticleCount: number; readonly gradientNorm: number; readonly maximumParticleGradientNorm: number; /** Full conservative evidence, including gradients at prescribed particles. */ readonly potential: XpbdPotentialStateEvaluationN; } /** * Predicts inertial centers from the current particle state without mutation. * * Registered conservative providers are intentionally absent: their energies * belong in the candidate objective. `particle.force` and gravity are treated * as explicit external accelerations, matching `XpbdWorldN` prediction. */ export declare function predictXpbdInertialStateN(options: PredictXpbdInertialStateNOptions): XpbdInertialPredictionN; /** * Evaluates the scaled mass-plus-potential objective without writing live * particles or caller-owned prediction and candidate-position buffers. */ export declare function evaluateXpbdIncrementalPotentialN(options: EvaluateXpbdIncrementalPotentialNOptions): XpbdIncrementalPotentialEvaluationN; //# sourceMappingURL=xpbd-incremental-potential.d.ts.map