molstar
Version:
A comprehensive macromolecular library.
31 lines (30 loc) • 1.58 kB
TypeScript
/**
* Copyright (c) 2019-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
import { WebGLContext } from '../../webgl/context';
import { Texture } from '../../../mol-gl/webgl/texture';
import { Vec3, Vec2, Mat4 } from '../../../mol-math/linear-algebra';
import { HistogramPyramid } from '../histogram-pyramid/reduction';
export declare function createIsosurfaceBuffers(ctx: WebGLContext, activeVoxelsBase: Texture, volumeData: Texture, histogramPyramid: HistogramPyramid, gridDim: Vec3, gridTexDim: Vec3, transform: Mat4, isoValue: number, invert: boolean, packedGroup: boolean, vertexTexture?: Texture, groupTexture?: Texture, normalTexture?: Texture): {
vertexTexture: Texture;
groupTexture: Texture;
normalTexture: Texture;
vertexCount: number;
};
/**
* GPU isosurface extraction
*
* Algorithm from "High‐speed Marching Cubes using HistoPyramids"
* by C Dyken, G Ziegler, C Theobalt, HP Seidel
* https://doi.org/10.1111/j.1467-8659.2008.01182.x
*
* Implementation based on http://www.miaumiau.cat/2016/10/stream-compaction-in-webgl/
*/
export declare function extractIsosurface(ctx: WebGLContext, volumeData: Texture, gridDim: Vec3, gridTexDim: Vec3, gridTexScale: Vec2, transform: Mat4, isoValue: number, invert: boolean, packedGroup: boolean, vertexTexture?: Texture, groupTexture?: Texture, normalTexture?: Texture): {
vertexTexture: Texture;
groupTexture: Texture;
normalTexture: Texture;
vertexCount: number;
};