/** * Copyright (c) 2025-2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose * @author Ludovic Autin */ import { Interval } from '../../../mol-data/int/interval.js'; import { OrderedSet } from '../../../mol-data/int/ordered-set.js'; import { PickingId } from '../../../mol-geo/geometry/picking.js'; import { LocationIterator } from '../../../mol-geo/util/location-iterator.js'; import { Sphere3D } from '../../../mol-math/geometry/primitives/sphere3d.js'; import { DataLocation } from '../../../mol-model/location.js'; import { DataLoci, Loci } from '../../../mol-model/loci.js'; import { Volume } from '../../../mol-model/volume/volume.js'; import { ParamDefinition as PD } from '../../../mol-util/param-definition.js'; import { Vec3 } from '../../../mol-math/linear-algebra/3d/vec3.js'; import { Mat4 } from '../../../mol-math/linear-algebra/3d/mat4.js'; export type StreamlinePoint = Vec3; export type Streamline = StreamlinePoint[]; export type Streamlines = Streamline[]; export type StreamlinesIndex = { readonly '@type': 'streamlines-index'; } & number; type VolumeStreamlines = { readonly volume: Volume; readonly streamlines: Streamlines; }; export interface StreamlinesLocation extends DataLocation { } export declare function StreamlinesLocation(streamlines: Streamlines, volume: Volume, index?: StreamlinesIndex, instance?: Volume.InstanceIndex): StreamlinesLocation; export declare function isStreamlinesLocation(x: any): x is StreamlinesLocation; export declare function areStreamlinesLocationsEqual(locA: StreamlinesLocation, locB: StreamlinesLocation): boolean; export declare function streamlinesLocationLabel(streamlines: Streamlines, volume: Volume, index: StreamlinesIndex, instance: Volume.InstanceIndex): string; export declare function streamlinesLociLabel(streamlines: Streamlines, volume: Volume, elements: ReadonlyArray): string; type StreamlinesElement = { readonly indices: OrderedSet; readonly instances: OrderedSet; }; export interface StreamlinesLoci extends DataLoci { } export declare function StreamlinesLoci(streamlines: Streamlines, volume: Volume, elements: ReadonlyArray): StreamlinesLoci; export declare function isStreamlinesLoci(x: any): x is StreamlinesLoci; export declare function getStreamlinesLociSize(elements: StreamlinesLoci['elements']): number; export declare function getStreamlinesLociBoundingSphere(streamlines: Streamlines, volume: Volume, elements: StreamlinesLoci['elements'], boundingSphere?: Sphere3D): Sphere3D; export declare function areStreamlinesLociEqual(a: StreamlinesLoci, b: StreamlinesLoci): boolean; export declare function isStreamlinesLociEmpty(loci: StreamlinesLoci): boolean; export declare const CommonStreamlinesParams: { anchorEnabled: PD.BooleanParam; anchorCenter: PD.Vec3; anchorRadius: PD.Numeric; dashEnabled: PD.BooleanParam; dashPoints: PD.Numeric; dashShift: PD.BooleanParam; }; export type CommonStreamlinesParams = typeof CommonStreamlinesParams; export type CommonStreamlinesProps = PD.Values; /** * Check if a streamline passes the sphere filter. * A streamline passes if its start or end point is within the filter sphere. */ export declare function streamlinePassesFilter(streamline: Streamline, gridToCartn: Mat4, props: CommonStreamlinesProps): boolean; export declare function getStreamlinesVisualLoci(volume: Volume, _props: CommonStreamlinesProps): StreamlinesLoci; export declare function getStreamlinesLoci(pickingId: PickingId, volume: Volume, _key: number, _props: CommonStreamlinesProps, id: number): Volume.Loci | { kind: "empty-loci"; } | StreamlinesLoci; export declare function eachStreamlines(loci: Loci, volume: Volume, _key: number, _props: CommonStreamlinesProps, apply: (interval: Interval) => boolean): boolean; export declare function createStreamlinesLocationIterator(volume: Volume): LocationIterator; export {};