@xeokit/xeokit-convert
Version:
JavaScript utilities to create .XKT files
87 lines (86 loc) • 2.35 kB
TypeScript
/**
* Represents the usage of a {@link XKTGeometry} by an {@link XKTEntity}.
*
* * Created by {@link XKTModel#createEntity}
* * Stored in {@link XKTEntity#meshes} and {@link XKTModel#meshesList}
* * Has an {@link XKTGeometry}, and an optional {@link XKTTextureSet}, both of which it can share with other {@link XKTMesh}es
* * Has {@link XKTMesh#color}, {@link XKTMesh#opacity}, {@link XKTMesh#metallic} and {@link XKTMesh#roughness} PBR attributes
* @class XKTMesh
*/
export class XKTMesh {
/**
* @private
*/
private constructor();
/**
* Unique ID of this XKTMesh in {@link XKTModel#meshes}.
*
* @type {Number}
*/
meshId: number;
/**
* Index of this XKTMesh in {@link XKTModel#meshesList};
*
* @type {Number}
*/
meshIndex: number;
/**
* The 4x4 modeling transform matrix.
*
* Transform is relative to the center of the {@link XKTTile} that contains this XKTMesh's {@link XKTEntity},
* which is given in {@link XKTMesh#entity}.
*
* When the ````XKTEntity```` shares its {@link XKTGeometry}s with other ````XKTEntity````s, this matrix is used
* to transform this XKTMesh's XKTGeometry into World-space. When this XKTMesh does not share its ````XKTGeometry````,
* then this matrix is ignored.
*
* @type {Number[]}
*/
matrix: number[];
/**
* The instanced {@link XKTGeometry}.
*
* @type {XKTGeometry}
*/
geometry: XKTGeometry;
/**
* RGB color of this XKTMesh.
*
* @type {Float32Array}
*/
color: Float32Array;
/**
* PBR metallness of this XKTMesh.
*
* @type {Number}
*/
metallic: number;
/**
* PBR roughness of this XKTMesh.
* The {@link XKTTextureSet} that defines the appearance of this XKTMesh.
*
* @type {Number}
* @type {XKTTextureSet}
*/
roughness: number;
/**
* Opacity of this XKTMesh.
*
* @type {Number}
*/
opacity: number;
/**
* The {@link XKTTextureSet} that defines the appearance of this XKTMesh.
*
* @type {XKTTextureSet}
*/
textureSet: XKTTextureSet;
/**
* The owner {@link XKTEntity}.
*
* Set by {@link XKTModel#createEntity}.
*
* @type {XKTEntity}
*/
entity: XKTEntity;
}