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 |
Child ObjectMeta instances within the structure hierarchy. |
|
public |
external: * External application-specific metadata |
|
public |
Globally-unique ID. |
|
public |
Model metadata. |
|
public |
Human-readable name. |
|
public abstract |
ID of the corresponding object within the originating system, if any. |
|
public |
The parent MetaObject within the structure hierarchy. |
|
public |
Optional PropertySets used by 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 children: Array source
Child ObjectMeta instances within the structure hierarchy.
Undefined when there are no children.
Properties:
Name | Type | Attribute | Description |
children | * |
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 metaModel: MetaModel source
Model metadata.
Properties:
Name | Type | Attribute | Description |
metaModel | * |
public abstract originalSystemId: String source
ID of the corresponding object within the originating system, if any.
public parent: MetaObject source
The parent MetaObject within the structure hierarchy.
Undefined when this is the root of its structure.
Properties:
Name | Type | Attribute | Description |
parent | * |
public propertySets: PropertySet[] source
Optional PropertySets used by 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. |