import { BoundingBox, BoundingSphere } from '@gglib/math'; import { TypeToken } from '@gglib/utils'; import { ModelMeshPart, ModelMeshPartOptions } from './ModelMeshPart'; import { Device } from '../Device'; import { Material, MaterialOptions } from '../Material'; /** * @public */ export interface ModelMeshOptions { /** * The identifying name of the mesh */ name?: string; /** * The axis aligned bounding box containing all mesh parts */ boundingBox?: number[] | BoundingBox; /** * The bounding sphere containing all mesh parts */ boundingSphere?: number[] | BoundingSphere; /** * Collection of materials that are used by the mesh */ materials?: Array; /** * Collection of mesh parts */ parts?: Array; } /** * @public */ export declare class ModelMesh { /** * A symbol identifying the `ModelMesh[]` type. */ static readonly Array: TypeToken; /** * A symbol identifying the `ModelMeshOptions` type. */ static readonly Options: TypeToken; /** * A symbol identifying the `ModelMeshOptions[]` type. */ static readonly OptionsArray: TypeToken; /** * Autmatically generated unique identifier */ readonly uid: string; /** * The graphics device */ readonly device: Device; /** * The models local bounding box */ boundingBox: BoundingBox; /** * The models local bounign sphere */ boundingSphere: BoundingSphere; /** * Collection of materials that are used by the model meshes */ materials: ReadonlyArray; /** * Collection of meshes */ parts: ReadonlyArray; /** * The index of the parent bone for this mesh */ boneId: number | null; /** * The name of this mesh */ name: string | null; constructor(device: Device, options: ModelMeshOptions); /** * Simply iterates over all meshes and renders each with its assigned material * * @remarks * If a mesh points to a missing material it is silently ignored. */ draw(): this; /** * Gets a material of this mesh by index or name * * @param indexOrName - The index or name of the material */ getMaterial(indexOrName: number | string): Material; } //# sourceMappingURL=ModelMesh.d.ts.map