import {MetaObject} from '@xeokit/xeokit-sdk/src/viewer/metadata/MetaObject.js'
MetaObject
Metadata corresponding to an Entity that represents an object.
An Entity represents an object when Entity#isObject is true
A MetaObject corresponds to an Entity by having the same MetaObject#id as the Entity#id.
A MetaObject is created within MetaScene#createMetaModel and belongs to a MetaModel.
Each MetaObject is registered by MetaObject#id in MetaScene#metaObjects.
A MetaModel represents its object structure with a tree of MetaObjects, with MetaModel#rootMetaObject referencing the root MetaObject.
Member Summary
Public Members | ||
public |
attributes: {} The attributes of this MetaObject. |
|
public |
external: * External application-specific metadata |
|
public |
Globally-unique ID. |
|
public get |
Backwards compatibility with the object belonging to a single MetaModel. |
|
public |
The MetaModels that share this MetaObject. |
|
public |
Human-readable name. |
|
public abstract |
ID of the corresponding object within the originating system, if any. |
|
public |
parent: MetaObject | null The parent MetaObject. |
|
public |
ID of the parent MetaObject. |
|
public |
propertySetIds: [] | * IDs of PropertySets associated with this MetaObject. |
|
public |
The PropertySets associated with this MetaObject. |
|
public |
Type - often an IFC product type. |
Method Summary
Public Methods | ||
public |
Returns properties of this MeteObject as JSON. |
|
public |
Gets the MetaObject#ids of the MetaObjects within the subtree. |
|
public |
getObjectIDsInSubtreeByType(types: String[]): String[] Gets the MetaObject#ids of the MetaObjects within the subtree that have the given MetaObject#types. |
|
public |
withMetaObjectsInSubtree(callback: Function) Iterates over the MetaObjects within the subtree. |
Public Members
public external: * source
External application-specific metadata
Undefined when there are is no external application-specific metadata.
Properties:
Name | Type | Attribute | Description |
external | * |
public id: String | Number source
Globally-unique ID.
MetaObject instances are registered by this ID in MetaScene#metaObjects.
Properties:
Name | Type | Attribute | Description |
id | * |
public get metaModel: MetaModel | null source
Backwards compatibility with the object belonging to a single MetaModel.
Properties:
Name | Type | Attribute | Description |
metaModel | * |
public abstract originalSystemId: String source
ID of the corresponding object within the originating system, if any.
public propertySets: PropertySet[] source
The PropertySets associated with this MetaObject.
Properties:
Name | Type | Attribute | Description |
propertySets | * |
Public Methods
public getJSON(): {id: String|Number, type: String, name: String, parent: String|Number|Undefined} source
Returns properties of this MeteObject as JSON.
public getObjectIDsInSubtree(): String[] source
Gets the MetaObject#ids of the MetaObjects within the subtree.
public getObjectIDsInSubtreeByType(types: String[]): String[] source
Gets the MetaObject#ids of the MetaObjects within the subtree that have the given MetaObject#types.
Params:
Name | Type | Attribute | Description |
types | String[] | MetaObject#type values. |
public withMetaObjectsInSubtree(callback: Function) source
Iterates over the MetaObjects within the subtree.
Params:
Name | Type | Attribute | Description |
callback | Function | Callback fired at each MetaObject. |