UNPKG

@thi.ng/boids

Version:

n-dimensional boids simulation with modular behavior system

24 lines 878 B
import { type IDeref } from "@thi.ng/api"; import type { IDistance, INeighborhood } from "@thi.ng/distance"; import type { ReadonlyVec } from "@thi.ng/vectors"; /** * In principle the same as eponymous class in thi.ng/distance, but with several * small optimizations for this package. * * @internal */ export declare class Radial<T> implements INeighborhood<ReadonlyVec, T>, IDeref<T[]> { dist: IDistance<ReadonlyVec>; target: ReadonlyVec; radius: number; protected _r: number; protected _items: T[]; constructor(dist: IDistance<ReadonlyVec>, target: ReadonlyVec, radius?: number); deref(): T[]; reset(): this; setRadius(r: number): this; includesDistance(d: number, eucledian?: boolean): boolean; includesPosition(pos: ReadonlyVec): boolean; consider(pos: ReadonlyVec, val: T): number; } //# sourceMappingURL=region.d.ts.map