/** * Copyright (c) 2018-2019 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose * @author David Sehnal */ import { ParamDefinition as PD } from '../../mol-util/param-definition'; import { Representation, RepresentationProps, RepresentationProvider } from '../representation'; import { StructureUnitTransforms } from '../../mol-model/structure/structure/util/unit-transforms'; import { Structure } from '../../mol-model/structure'; import { BaseGeometry } from '../../mol-geo/geometry/base'; import { Mesh } from '../../mol-geo/geometry/mesh/mesh'; import { Spheres } from '../../mol-geo/geometry/spheres/spheres'; import { Points } from '../../mol-geo/geometry/points/points'; import { Lines } from '../../mol-geo/geometry/lines/lines'; import { DirectVolume } from '../../mol-geo/geometry/direct-volume/direct-volume'; import { TextureMesh } from '../../mol-geo/geometry/texture-mesh/texture-mesh'; import { Text } from '../../mol-geo/geometry/text/text'; export interface StructureRepresentationState extends Representation.State { unitTransforms: StructureUnitTransforms | null, unitTransformsVersion: number } export const StructureRepresentationStateBuilder: Representation.StateBuilder = { create: () => { return { ...Representation.createState(), unitTransforms: null, unitTransformsVersion: -1 } }, update: (state: StructureRepresentationState, update: Partial) => { Representation.updateState(state, update) if (update.unitTransforms !== undefined) state.unitTransforms = update.unitTransforms } } export interface StructureRepresentation

extends Representation { } export type StructureRepresentationProvider

= RepresentationProvider export function StructureRepresentationProvider

(p: StructureRepresentationProvider): StructureRepresentationProvider { return p; } // export const StructureParams = { ...BaseGeometry.Params } export type StructureParams = typeof StructureParams export const StructureMeshParams = { ...Mesh.Params, ...StructureParams } export type StructureMeshParams = typeof StructureMeshParams export const StructureSpheresParams = { ...Spheres.Params, ...StructureParams } export type StructureSpheresParams = typeof StructureSpheresParams export const StructurePointsParams = { ...Points.Params, ...StructureParams } export type StructurePointsParams = typeof StructurePointsParams export const StructureLinesParams = { ...Lines.Params, ...StructureParams } export type StructureLinesParams = typeof StructureLinesParams export const StructureTextParams = { ...Text.Params, ...StructureParams } export type StructureTextParams = typeof StructureTextParams export const StructureDirectVolumeParams = { ...DirectVolume.Params, ...StructureParams } export type StructureDirectVolumeParams = typeof StructureDirectVolumeParams export const StructureTextureMeshParams = { ...TextureMesh.Params, ...StructureParams } export type StructureTextureMeshParams = typeof StructureTextureMeshParams export { ComplexRepresentation } from './complex-representation' export { UnitsRepresentation } from './units-representation' export { ComplexVisual } from './complex-visual' export { UnitsVisual } from './units-visual'