molstar
Version:
A comprehensive macromolecular library.
43 lines (42 loc) • 1.98 kB
TypeScript
/**
* Copyright (c) 2019-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
import { ValueCell } from '../../../mol-util';
import { GeometryUtils } from '../geometry';
import { ParamDefinition as PD } from '../../../mol-util/param-definition';
import { Sphere3D } from '../../../mol-math/geometry';
import { GroupMapping } from '../../util';
export interface Spheres {
readonly kind: 'spheres';
/** Number of spheres */
sphereCount: number;
/** Center buffer as array of xyz values wrapped in a value cell */
readonly centerBuffer: ValueCell<Float32Array>;
/** Mapping buffer as array of xy values wrapped in a value cell */
readonly mappingBuffer: ValueCell<Float32Array>;
/** Index buffer as array of center index triplets wrapped in a value cell */
readonly indexBuffer: ValueCell<Uint32Array>;
/** Group buffer as array of group ids for each vertex wrapped in a value cell */
readonly groupBuffer: ValueCell<Float32Array>;
/** Bounding sphere of the spheres */
readonly boundingSphere: Sphere3D;
/** Maps group ids to sphere indices */
readonly groupMapping: GroupMapping;
setBoundingSphere(boundingSphere: Sphere3D): void;
}
export declare namespace Spheres {
function create(centers: Float32Array, mappings: Float32Array, indices: Uint32Array, groups: Float32Array, sphereCount: number, spheres?: Spheres): Spheres;
function createEmpty(spheres?: Spheres): Spheres;
const Params: {
sizeFactor: PD.Numeric;
doubleSided: PD.BooleanParam;
ignoreLight: PD.BooleanParam;
xrayShaded: PD.BooleanParam;
alpha: PD.Numeric;
quality: PD.Select<"custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest">;
};
type Params = typeof Params;
const Utils: GeometryUtils<Spheres, Params>;
}