import { BoundingBox, BoundingSphere } from '@gglib/math'; import { Device } from '../Device'; import { PrimitiveTypeOption } from '../enums'; import { Buffer, BufferOptions } from '../resources/Buffer'; import { ShaderProgram } from '../resources/ShaderProgram'; /** * Constructor options for {@link ModelMeshPart} * * @public */ export interface ModelMeshPartOptions { /** * A user defined name of the mesh object */ name?: string; /** * An axis aligned bounding box containing the mesh in local space */ boundingBox?: number[] | BoundingBox; /** * A bounding sphere containing the mesh in local space */ boundingSphere?: number[] | BoundingSphere; /** * The material identifier. Defaults to 0 */ materialId?: number | string; /** * The index buffer */ indexBuffer?: Buffer | BufferOptions; /** * A single vertex buffer or an array ob vertex buffers */ vertexBuffer?: Buffer | BufferOptions | Array; /** * Offset in vertex buffer */ /** * The mode of the mesh. e.g. TrinagleList, LineList etc. */ primitiveType?: PrimitiveTypeOption; } /** * @public */ export declare class ModelMeshPart { static readonly Options: unique symbol; /** * A unique id */ uid: string; /** * The graphics device */ readonly device: Device; /** * The axis aligned bounding box containing the mesh in local space */ boundingBox: BoundingBox; /** * The bounding sphere containing the mesh in local space */ boundingSphere: BoundingSphere; /** * The material id or name referencing the material in the models material collection */ materialId: number | string; /** * The index buffer */ indexBuffer: Buffer; /** * Offset in index buffer */ indexOffset: number | null; /** * The vertex buffers */ vertexBuffer: Buffer[]; /** * The vertex buffer primitive type */ primitiveType: number; constructor(device: Device, params: ModelMeshPartOptions); /** * Draws the mesh with the given program * * @param program - the program to draw with */ draw(program: ShaderProgram): ModelMeshPart; destroy(): void; } //# sourceMappingURL=ModelMeshPart.d.ts.map