import type React from "react";
import { CompositeLayer } from "@deck.gl/core";
import type { Material } from "../gpglLayers/typeDefs";
import PrivateLayer from "./privateGrid3dLayer";
import type { ExtendedLayerProps, ReportBoundingBoxAction } from "../utils/layerTools";
import type { ColormapFunctionType } from "../utils/colormapTools";
import type { Color, RGBColor } from "../../utils";
export type WebWorkerParams = {
    points: Float32Array;
    polys: Uint32Array;
    properties: Float32Array | Uint16Array | undefined;
    undefinedValue: number;
};
/**
 * Enumerates possible coloring modes of Grid3D Layer.
 */
export declare enum TGrid3DColoringMode {
    /** A continuous property is provided to colorize the cells. */
    Property = 0,
    /** A discrete property is provided to colorize the cells. */
    DiscreteProperty = 1,
    /** Coloring using the X value of the cell nodes. */
    X = 2,
    /** Coloring using the Y value of the cell nodes. */
    Y = 3,
    /** Coloring using the Z value of the cell nodes. */
    Z = 4
}
/**
 * Returns true if the coloring mode is geometric, that is based on the X, Y or Z coordinates
 * of the cell nodes. In that case no explicit property data is required.
 * @param coloringMode coloring mode.
 * @returns true if the coloring mode is geometric.
 */
export declare function isGeometricProperty(coloringMode: TGrid3DColoringMode): boolean;
/**
 * Returns true if the coloring mode is discrete. In that case an explicit property data is required,
 * with integer values ranging from 0 to N, where N is the number of discrete property values.
 * @param coloringMode coloring mode
 * @returns true if the property values are discrete.
 */
export declare function isDiscreteProperty(coloringMode: TGrid3DColoringMode): boolean;
export interface IDiscretePropertyValueName {
    value: number;
    name: string;
}
export interface Grid3DLayerProps extends ExtendedLayerProps {
    /**  Url, or native, or typed javascript array. Set of points.
     * [x1, y1, z1, x2, y2, z2, ...]
     */
    pointsData: string | number[] | Float32Array;
    /**  Url, or native, or typed javascript array.
     * For each polygon ["number of points in poly", p1, , p2 ... ]
     * Example of two polygons: the first polygon with 4 points and the second one with 3 points.
     * [4, 3, 1, 9, 77, 3, 6, 44, 23]
     */
    polysData: string | number[] | Uint32Array;
    /**  Url, or native, or typed javascript array.
     *  A scalar property for each polygon.
     * [0.23, 0.11. 0.98, ...]
     * If propertiesData is provided as Uint16Array it is assumed that all the values are in range [0, N].
     * If colorMapFunction is Uint8Array the property values are used as color indices.
     */
    propertiesData: string | number[] | Float32Array | Uint16Array | undefined;
    /**
     * Discrete property value-name pairs to be displayed in cursor readouts.
     * The property values are used as the array indices.
     */
    discretePropertyValueNames?: IDiscretePropertyValueName[];
    /**
     * Defines how the cells are to be colored:
     * by property value or by a coordinate.
     */
    coloringMode?: TGrid3DColoringMode;
    /**  Name of color map. E.g "PORO"
     */
    colorMapName: string;
    /**  Use color map in this range.
     */
    colorMapRange?: [number, number];
    /** Clamp colormap to this color at ends.
     *   Given as array of three values (r,g,b) e.g: [255, 0, 0]
     *   If not set or set to true, it will clamp to color map min and max values.
     *   If set to false the clamp color will be completely transparent.
     */
    colorMapClampColor: Color | undefined | boolean;
    /**  Optional function property.
     * If defined this function will override the color map.
     * Takes a value in the range [0,1] and returns a color.
     * E.g. (x) => [x * 255, x * 255, x * 255]
     * May also be set as constant color:
     * E.g. [255, 0, 0] for constant red cells.
     * Can be defined as Uint8Array containing [R, G, B] triplets in [0, 255] range each.
     */
    colorMapFunction?: ColormapFunctionType | Uint8Array;
    /**
     * Value in propertiesData indicating that the property is undefined.
     * When propertiesData is Uint16Array the value is index in discretePropertyValueNames if provided.
     * By default, it is assumed to be NaN for Float32 properties data and 0xFFFF for UInt16.
     * Note: in case of floating point properties exact comparison is performed so use the same
     * constant value both in propertiesData array and as undefinedPropertyValue.
     */
    undefinedPropertyValue?: number;
    /**
     * Color for the cells with undefined property value.
     * Is not overridden by and used prior to colorMapFunction.
     * By default, Light gray if not provided.
     */
    undefinedPropertyColor?: RGBColor;
    /** Enable lines around cell faces.
     *  default: true.
     */
    gridLines: boolean;
    /** Surface material properties.
     * material: true  = default material, coloring depends on surface orientation and lighting.
     *           false = no material,  coloring is independent on surface orientation and lighting.
     *           or full spec:
     *      material: {
     *           ambient: 0.35,
     *           diffuse: 0.6,
     *           shininess: 32,
     *           specularColor: [38, 38, 38],
     *       }
     */
    material: Material;
    /** Enable/disable depth testing when rendering layer. Default true.
     */
    depthTest: boolean;
    /** If true means that input z values are interpreted as depths.
     *   For example depth of z = 1000 corresponds to -1000 on the z axis. Default true.
     */
    ZIncreasingDownwards: boolean;
    reportBoundingBox?: React.Dispatch<ReportBoundingBoxAction>;
}
export default class Grid3DLayer extends CompositeLayer<Grid3DLayerProps> {
    get isLoaded(): boolean;
    rebuildData(reportBoundingBox: boolean): void;
    initializeState(): void;
    updateState({ props, oldProps, }: {
        props: Grid3DLayerProps;
        oldProps: Grid3DLayerProps;
    }): void;
    renderLayers(): [PrivateLayer?];
    private getPropertyValueRange;
    private getUndefinedPropertyValue;
    private getUndefinedPropertyColor;
    private isColormapFunctionConstantColor;
}
