import type { eTSRRenderMode, TSciChart3D } from "../../../types/TSciChart3D"; import type { Vector3 } from "../../Vector3"; /** * A drawing context which builds and draws a dynamic 3D lit (normal-carrying) mesh on the fly. * * This is the TypeScript / WebAssembly equivalent of the WPF `ImmediateLitMeshContext`. It is a thin wrapper * around the native {@link SCRTImmediateLitMeshDrawingProvider}: the JS side only accumulates plain vertex data * (position / normal / texcoord / color / selection id) and passes it as a struct; all command-buffer, pipeline * and material handling happens natively inside the provider. * * Build geometry one vertex at a time — set the per-vertex attributes ({@link normal3} / {@link texCoord2} / * {@link setVertexColor} / {@link setSelectionId}) then call {@link setVertex3}, which emits a vertex using the * current attribute state. Call {@link dispose} to submit the draw call and release native resources. * * ```ts * const ctx = new ImmediateLitMeshContext(wasmContext, renderMode); * ctx.normal3(0, 1, 0); * ctx.setVertexColor("#FF6600"); * ctx.setVertex3(x, y, z); // emits a vertex * // ...more vertices... * ctx.dispose(); // submits the mesh * ``` */ export declare class ImmediateLitMeshContext { private readonly provider; private readonly params; private readonly vertices; private readonly scratch; /** * Creates an instance of {@link ImmediateLitMeshContext} and begins an immediate-mode rendering session. * @param webAssemblyContext The {@link TSciChart3D} WebAssembly context. * @param renderMode The render mode (triangles, triangle-strip, lines etc.) for the submitted geometry. * @remarks Cull mode (none) and depth mode (enabled) are fixed by the native provider. */ constructor(webAssemblyContext: TSciChart3D, renderMode: eTSRRenderMode); /** * Sets the normal applied to subsequently emitted vertices, used by the lighting model. */ normal3(nx: number, ny: number, nz: number): void; /** * Sets the texture coordinate applied to subsequently emitted vertices. */ texCoord2(u: number, v: number): void; /** * Sets the color applied to subsequently emitted vertices. * @param color Either an HTML/CSS color string (e.g. `"#FF6600"`) or a 32-bit ARGB number. */ setVertexColor(color: string | number): void; /** * Sets the selection identifier applied to subsequently emitted vertices. */ setSelectionId(selectionId: number): void; /** * Emits a vertex at the given X,Y,Z position using the current normal / texcoord / color / selection state. */ setVertex3(x: number, y: number, z: number): void; /** * Emits a vertex from a {@link Vector3} position using the current attribute state. */ setVertex3v(vector: Vector3): void; /** * Submits the accumulated geometry to the native provider for rendering, then releases native resources. */ dispose(): void; }