UNPKG

@xeokit/xeokit-convert

Version:

JavaScript utilities to create .XKT files

64 lines (63 loc) 2.07 kB
/** * An object within an {@link XKTModel}. * * * Created by {@link XKTModel#createEntity} * * Stored in {@link XKTModel#entities} and {@link XKTModel#entitiesList} * * Has one or more {@link XKTMesh}s, each having an {@link XKTGeometry} * * @class XKTEntity */ export class XKTEntity { /** * @private * @param entityId * @param meshes */ private constructor(); /** * Unique ID of this ````XKTEntity```` in {@link XKTModel#entities}. * * For a BIM model, this will be an IFC product ID. * * We can also use {@link XKTModel#createMetaObject} to create an {@link XKTMetaObject} to specify metadata for * this ````XKTEntity````. To associate the {@link XKTMetaObject} with our {@link XKTEntity}, we give * {@link XKTMetaObject#metaObjectId} the same value as {@link XKTEntity#entityId}. * * @type {String} */ entityId: string; /** * Index of this ````XKTEntity```` in {@link XKTModel#entitiesList}. * * Set by {@link XKTModel#finalize}. * * @type {Number} */ entityIndex: number; /** * A list of {@link XKTMesh}s that indicate which {@link XKTGeometry}s are used by this Entity. * * @type {XKTMesh[]} */ meshes: XKTMesh[]; /** * World-space axis-aligned bounding box (AABB) that encloses the {@link XKTGeometry#positions} of * the {@link XKTGeometry}s that are used by this ````XKTEntity````. * * Set by {@link XKTModel#finalize}. * * @type {Float32Array} */ aabb: Float32Array; /** * Indicates if this ````XKTEntity```` shares {@link XKTGeometry}s with other {@link XKTEntity}'s. * * Set by {@link XKTModel#finalize}. * * Note that when an ````XKTEntity```` shares ````XKTGeometrys````, it shares **all** of its ````XKTGeometrys````. An ````XKTEntity```` * never shares only some of its ````XKTGeometrys```` - it always shares either the whole set or none at all. * * @type {Boolean} */ hasReusedGeometries: boolean; }