/** * Copyright (c) 2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose */ import { Mesh } from '../../../../mol-geo/geometry/mesh/mesh.js'; import { Spheres } from '../../../../mol-geo/geometry/spheres/spheres.js'; import { SizeData } from '../../../../mol-geo/geometry/size-data.js'; import { Structure } from '../../../../mol-model/structure.js'; import { Theme } from '../../../../mol-theme/theme.js'; import { SizeTheme } from '../../../../mol-theme/size.js'; import { WebGLContext } from '../../../../mol-gl/webgl/context.js'; import { VisualContext } from '../../../visual.js'; /** The subset of representation props needed to build a structure target geometry. */ export interface StructureTargetProps { type: string; sizeFactor: number; detail: number; tryUseImpostor: boolean; } export declare function structureTargetUseImpostor(props: StructureTargetProps, webgl?: WebGLContext): boolean; /** The scale a size theme contributes to the target's own radii. */ export declare function getSizeScale(theme: Theme): number; /** * The size theme applied to the elements of a target structure. The representation's size theme * assigns sizes to particles, not to the elements of their targets, so only its scale is used; * a uniform size theme however overrides the physical radii. */ export declare function getStructureTargetSizeTheme(theme: Theme): SizeTheme; /** Build the geometry for a structure target: impostor spheres or a sphere mesh. */ export declare function createStructureTargetGeometry(ctx: VisualContext, structure: Structure, theme: Theme, props: StructureTargetProps, webgl?: WebGLContext, existing?: Spheres | Mesh): Spheres | Mesh; /** * Per-element sizes of a structure target come from the physical (vdW/coarse) radii of its * elements; a uniform size theme overrides them, any other theme only contributes its scale. */ export declare function createStructureTargetSizes(structure: Structure, theme: Theme, sizeData?: SizeData): SizeData; /** Whether the sphere geometry must be rebuilt because relevant props changed. */ export declare function structureTargetGeometryPropsChanged(oldProps: StructureTargetProps, newProps: StructureTargetProps, webgl?: WebGLContext): boolean; /** Whether toggling impostor usage requires recreating the render object (geometry kind changes). */ export declare function structureTargetMustRecreate(oldProps: StructureTargetProps, newProps: StructureTargetProps): boolean; /** Whether the impostor sphere size factor changed (impostor spheres carry size as a uniform). */ export declare function structureTargetSizeFactorChanged(oldProps: StructureTargetProps, newProps: StructureTargetProps, webgl?: WebGLContext): boolean;