/** * Copyright (c) 2020-2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose * @author Gianluca Tomasello */ import { ValueCell } from '../../../mol-util/index.js'; import { Mat4 } from '../../../mol-math/linear-algebra.js'; import { GroupMapping } from '../../util.js'; import { GeometryUtils } from '../geometry.js'; import { ParamDefinition as PD } from '../../../mol-util/param-definition.js'; import { Sphere3D } from '../../../mol-math/geometry.js'; import { Color } from '../../../mol-util/color/index.js'; export interface Cylinders { readonly kind: 'cylinders'; /** Number of cylinders */ cylinderCount: number; /** Mapping buffer as array of uvw values wrapped in a value cell */ readonly mappingBuffer: ValueCell; /** Index buffer as array of vertex index triplets wrapped in a value cell */ readonly indexBuffer: ValueCell; /** Group buffer as array of group ids for each vertex wrapped in a value cell */ readonly groupBuffer: ValueCell; /** Cylinder start buffer as array of xyz values wrapped in a value cell */ readonly startBuffer: ValueCell; /** Cylinder end buffer as array of xyz values wrapped in a value cell */ readonly endBuffer: ValueCell; /** Cylinder scale buffer as array of scaling factors wrapped in a value cell */ readonly scaleBuffer: ValueCell; /** Cylinder cap buffer as array of cap flags wrapped in a value cell */ readonly capBuffer: ValueCell; /** * Cylinder colorMode buffer as array of coloring modes flags wrapped in a value cell * - for colorMode between 0 and 1 use colorMode to interpolate * - for colorMode == 2 do nothing, i.e., use given theme color * - for colorMode == 3 use position on cylinder axis to interpolate */ readonly colorModeBuffer: ValueCell; /** Bounding sphere of the cylinders */ readonly boundingSphere: Sphere3D; /** Maps group ids to cylinder indices */ readonly groupMapping: GroupMapping; setBoundingSphere(boundingSphere: Sphere3D): void; hasBoundingSphere(): boolean; } export declare namespace Cylinders { function create(mappings: Float32Array, indices: Uint32Array, groups: Float32Array, starts: Float32Array, ends: Float32Array, scales: Float32Array, caps: Float32Array, colorModes: Float32Array, cylinderCount: number, cylinders?: Cylinders): Cylinders; function createEmpty(cylinders?: Cylinders): Cylinders; function transform(cylinders: Cylinders, t: Mat4): void; const Params: { sizeFactor: PD.Numeric; sizeAspectRatio: PD.Numeric; doubleSided: PD.BooleanParam; ignoreLight: PD.BooleanParam; celShaded: PD.BooleanParam; xrayShaded: PD.Select; transparentBackfaces: PD.Select<"off" | "on" | "opaque">; solidInterior: PD.BooleanParam; bumpFrequency: PD.Numeric; bumpAmplitude: PD.Numeric; interior: PD.Group; substanceStrength: number; }>>; colorMode: PD.Select<"default" | "interpolate">; alpha: PD.Numeric; quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">; material: PD.Group>; clip: PD.Group[]; }>>; emissive: PD.Numeric; density: PD.Numeric; instanceGranularity: PD.BooleanParam; lod: PD.Vec3; cellSize: PD.Numeric; batchSize: PD.Numeric; }; type Params = typeof Params; const Utils: GeometryUtils; }