UNPKG

@itwin/core-frontend

Version:
87 lines 3.83 kB
/** @packageDocumentation * @module Rendering */ import { AuxChannel as PolyfaceAuxChannel } from "@itwin/core-geometry"; /** @alpha */ export interface AuxChannelProps { readonly name: string; readonly inputs: number[]; readonly indices: number[]; } /** @alpha */ export interface QuantizedAuxChannelProps extends AuxChannelProps { readonly qOrigin: number[]; readonly qScale: number[]; } /** @alpha */ export declare class AuxChannel implements AuxChannelProps { readonly name: string; readonly inputs: number[]; readonly indices: number[]; constructor(props: AuxChannelProps); toJSON(): AuxChannelProps; } /** @alpha */ export declare class AuxDisplacementChannel extends AuxChannel { readonly qOrigin: Float32Array; readonly qScale: Float32Array; constructor(props: QuantizedAuxChannelProps); toJSON(): QuantizedAuxChannelProps; } /** @alpha */ export declare class AuxParamChannel extends AuxChannel { readonly qOrigin: number; readonly qScale: number; constructor(props: QuantizedAuxChannelProps); toJSON(): QuantizedAuxChannelProps; } /** @alpha */ export interface AuxChannelTableProps { /** Rectangular array of per-vertex data, of size width * height * numBytesPerVertex bytes. */ readonly data: Uint8Array; /** The number of 4-byte RGBA columns in each row of the array. */ readonly width: number; /** The number of rows in the array. */ readonly height: number; /** The number of vertices in the array. Must be no more than (width * height) / numBytesPerVertex. */ readonly count: number; /** The number of bytes allocated for each vertex. Must be a multiple of two. */ readonly numBytesPerVertex: number; /** Displacements used for animations. */ readonly displacements?: QuantizedAuxChannelProps[]; /** Normals used for animations. */ readonly normals?: AuxChannelProps[]; /** Scalar params used for animations. */ readonly params?: QuantizedAuxChannelProps[]; } /** * Represents one or more channels of auxiliary per-vertex data which can be used to animate and resymbolize a mesh in various ways. * Each channel holds a fixed number of bytes for each vertex (typically 2 bytes for normals and params, 6 bytes for displacements). * The channels are interleaved in a rectangular array such that the data for each vertex is stored contiguously; that is, if a displacement and * a normal channel exist, then the first vertex's displacement is followed by the first vertex's normal, which is followed by the second * vertex's displacement and normal; and so on. * @alpha */ export declare class AuxChannelTable { /** Rectangular array of per-vertex data, of size width * height * numBytesPerVertex bytes. */ readonly data: Uint8Array; /** The number of 4-byte RGBA columns in each row of the array. */ readonly width: number; /** The number of rows in the array. */ readonly height: number; /** The number of vertices in the array. Must be no more than (width * height) / numBytesPerVertex. */ readonly numVertices: number; /** The number of bytes allocated for each vertex. Must be a multiple of two. */ readonly numBytesPerVertex: number; /** Displacements used for animations. */ readonly displacements?: AuxDisplacementChannel[]; /** Normals used for animations. */ readonly normals?: AuxChannel[]; /** Scalar params used for animations. */ readonly params?: AuxParamChannel[]; private constructor(); static fromJSON(props: AuxChannelTableProps): AuxChannelTable | undefined; toJSON(): AuxChannelTableProps; static fromChannels(channels: ReadonlyArray<PolyfaceAuxChannel>, numVertices: number, maxDimension: number): AuxChannelTable | undefined; } //# sourceMappingURL=AuxChannelTable.d.ts.map