M3D / M3D / Reader / LocalSvlxReader
Class: LocalSvlxReader
Description
本地Svlx读取
Memberof
SView.Reader
Author
YW
Date
2022-1-17
Version
1.0
Hierarchy
-
↳
LocalSvlxReader
↳↳
WorkerReader
Table of contents
Constructors
Properties
Methods
- addFile
- cancel
- cancle
- getAnimation
- getAnimationRes
- getAnnotation
- getAnnotations
- getAttribute
- getCenter
- getDecals
- getEdges
- getEntities
- getEntitiesFile
- getEvents
- getFaces
- getFile
- getFileId
- getGeometries
- getGeometryFeature
- getGeometryFeatures
- getGroups
- getHotSpot
- getHotSpots
- getHotspotRes
- getId
- getImages
- getIsRequesting
- getLocalModelViewContent
- getMaterialById
- getMaterials
- getMaxObjectId
- getMeasure
- getMeasures
- getMesh
- getMesh_1
- getModelBoard
- getModelBoards
- getModelProperties
- getModelViewContent
- getModelViewList
- getModels
- getPMIs
- getParentModel
- getProtoProperties
- getProtos
- getScene
- getSection
- getSections
- getServerModelViewContent
- getServerModelViewList
- getShapes
- getShapesFile
- getSignRes
- getThreeDGesture
- getThreeDGestures
- getTopModel
- getUrl
- isCancle
- isJson
- load
- onBegin
- onCancel
- onEnd
- onException
- onProgress
- onUpdata
- post
- registerEvent
- registerReaderEvent
- removeEvent
- send
- setFile
- setFileId
- setId
- setIsParseInfo
- setIsReferenceReader
- setParentModel
- setScene
- setSvlxFile
- setTopModel
- setUrl
- updata
- getMaxSvlxVersion
- getMinSvlxVersion
Constructors
constructor
• new LocalSvlxReader(options?
): LocalSvlxReader
Parameters
Name | Type | Description |
---|---|---|
options? | any | 选项 |
Returns
Description
构造函数
Overrides
Properties
center
• center: M3DMessageCenter
Inherited from
id
• id: number
Inherited from
parseMap
• parseMap: Map
<any
, any
>
Inherited from
count
▪ Static
count: number
Inherited from
Methods
addFile
▸ addFile(file
): void
Parameters
Name | Type | Description |
---|---|---|
file | any | 文件 |
Returns
void
Description
添加文件
Inherited from
cancel
▸ cancel(): void
Returns
void
Description
取消接口
Inherited from
cancle
▸ cancle(): void
Returns
void
Description
设置取消
Inherited from
getAnimation
▸ getAnimation(): Promise
<Map
<string
, string
>>
Returns
Promise
<Map
<string
, string
>>
动画数据字符串
Description
获取动画数据,数据格式为xml字符串
Inherited from
getAnimationRes
▸ getAnimationRes(): Promise
<Map
<string
, ArrayBuffer
>>
Returns
Promise
<Map
<string
, ArrayBuffer
>>
动画关联资源数据ArrayBuffer
Description
获取动画关联资源数据
Inherited from
getAnnotation
▸ getAnnotation(annotationId
): Promise
<Annotation
>
Parameters
Name | Type | Description |
---|---|---|
annotationId | number | 批注Id |
Returns
Promise
<Annotation
>
Annotation 批注对象
Description
根据id获取单个批注对象
Inherited from
getAnnotations
▸ getAnnotations(): Promise
<Map
<number
, Annotation
>>
Returns
Promise
<Map
<number
, Annotation
>>
批注对象 Map
Description
获取所有批注对象的Map
Inherited from
getAttribute
▸ getAttribute(model
): Promise
<Map
<string
, Object
>>
Parameters
Name | Type | Description |
---|---|---|
model | Model | 模型 |
Returns
Promise
<Map
<string
, Object
>>
属性集(异步)
Description
获取指定model对应的属性
Inherited from
getCenter
▸ getCenter(): M3DMessageCenter
Returns
Description
获得消息中心
Inherited from
getDecals
▸ getDecals(): Promise
<Map
<number
, Decal
>>
Returns
Promise
<Map
<number
, Decal
>>
贴图map
Description
获取所有贴图
Inherited from
getEdges
▸ getEdges(proto
, shapeType
, geoType
, meshArray?
): Promise
<Map
<number
, []>>
Parameters
Name | Type | Description |
---|---|---|
proto | Model | 模型 |
shapeType | ShapeType | - |
geoType | GeoFeatureEnum | 模型 未使用 |
meshArray? | ArrayBuffer | mesh数据 可选参数 |
Returns
Promise
<Map
<number
, []>>
Description
获取原型下当前等级LOD所有边对象
Inherited from
getEntities
▸ getEntities(propertyType
): Promise
<Map
<number
, M3DObject
>>
Parameters
Name | Type | Description |
---|---|---|
propertyType | EntityType | 数据类型 |
Returns
Promise
<Map
<number
, M3DObject
>>
Description
获取所有指定类型的数据对象, 如:info、material、modelview
Inherited from
getEntitiesFile
▸ getEntitiesFile(propertyType
): string
Parameters
Name | Type | Description |
---|---|---|
propertyType | EntityType | 实体类型 |
Returns
string
数据文件字符串
Description
获取所有指定类型的数据文件
Inherited from
getEvents
▸ getEvents(): M3DEvent
[]
Returns
M3DEvent
[]
Description
获得事件列表
Inherited from
getFaces
▸ getFaces(proto
, meshArray?
): Promise
<any
>
Parameters
Name | Type | Description |
---|---|---|
proto | Model | 模型 |
meshArray? | ArrayBuffer | 可选参数 |
Returns
Promise
<any
>
Description
获取原型下当前等级LOD所有面对象
Inherited from
getFile
▸ getFile(): File
Returns
Description
获取模型文件
Inherited from
getFileId
▸ getFileId(): string
Returns
string
Description
获取模型对应的唯一标识
Inherited from
getGeometries
▸ getGeometries(): Promise
<Map
<number
, Shape
>>
Returns
Promise
<Map
<number
, Shape
>>
Description
获取所有的几何数据
Inherited from
getGeometryFeature
▸ getGeometryFeature(shape
): GeometryFeature
| Map
<number
, GeometryFeature
>[]
Parameters
Name | Type | Description |
---|---|---|
shape | Shape | 可见对象 |
Returns
GeometryFeature
| Map
<number
, GeometryFeature
>[]
几何特征对象或几何特征Map数组
Description
获取几何特征
Inherited from
getGeometryFeatures
▸ getGeometryFeatures(): Promise
<Map
<number
, Map
<number
, GeometryFeature
>[]>>
Returns
Promise
<Map
<number
, Map
<number
, GeometryFeature
>[]>>
Description
获取所有几何属性
Inherited from
SvlxReader.getGeometryFeatures
getGroups
▸ getGroups(): Promise
<Map
<number
, Group
>>
Returns
Promise
<Map
<number
, Group
>>
Description
获取所有组的数组
Inherited from
getHotSpot
▸ getHotSpot(hotSpotId
): Promise
<HotSpot
>
Parameters
Name | Type | Description |
---|---|---|
hotSpotId | number | 热点Id |
Returns
Promise
<HotSpot
>
热点对象
Description
通过热点Id获取热点对象
Inherited from
getHotSpots
▸ getHotSpots(): Promise
<Map
<number
, HotSpot
>>
Returns
Promise
<Map
<number
, HotSpot
>>
热点Map
Description
获取所有热点对象的Map
Inherited from
getHotspotRes
▸ getHotspotRes(): Promise
<Map
<string
, ArrayBuffer
>>
Returns
Promise
<Map
<string
, ArrayBuffer
>>
热点关联资源数据ArrayBuffer
Description
获取热点关联资源数据
Inherited from
getId
▸ getId(): number
Returns
number
Description
获取id
Inherited from
getImages
▸ getImages(): Promise
<Map
<number
, Image
>>
Returns
Promise
<Map
<number
, Image
>>
视图对象图章Map
Description
获取所有图章对象的Map
Inherited from
getIsRequesting
▸ getIsRequesting(): boolean
Returns
boolean
Description
是否在请求
getLocalModelViewContent
▸ getLocalModelViewContent(modelViewId
): Promise
<ModelView
>
Parameters
Name | Type | Description |
---|---|---|
modelViewId | number | 视图id |
Returns
Promise
<ModelView
>
视图对象 包含视图播放所需所有数据
Description
根据视图id获取本地视图详细数据
Inherited from
SvlxReader.getLocalModelViewContent
getMaterialById
▸ getMaterialById(materialId
): BaseMaterial
Parameters
Name | Type | Description |
---|---|---|
materialId | number | 材质id |
Returns
基本材质类
Description
通过材质id获取材质对象
Inherited from
getMaterials
▸ getMaterials(): Promise
<Map
<number
, BaseMaterial
>>
Returns
Promise
<Map
<number
, BaseMaterial
>>
材质对象Map
Description
获取所有材质对象的Map
Inherited from
getMaxObjectId
▸ getMaxObjectId(): number
Returns
number
Description
获取最大的id
Inherited from
getMeasure
▸ getMeasure(measureId
): Promise
<Measure
>
Parameters
Name | Type | Description |
---|---|---|
measureId | number | 测量Id |
Returns
Promise
<Measure
>
Measure 测量对象
Description
根据id获取单个测量对象
Inherited from
getMeasures
▸ getMeasures(): Promise
<Map
<number
, Measure
>>
Returns
Promise
<Map
<number
, Measure
>>
测量对象Map
Description
获取所有测量对象的Map
Inherited from
getMesh
▸ getMesh(lodData
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
lodData | any |
Returns
Promise
<boolean
>
异步返回是否加载成功
Description
获取mesh数据
Inherited from
getMesh_1
▸ getMesh_1(model?
, offset?
): Promise
<boolean
>
Parameters
Name | Type | Default value | Description |
---|---|---|---|
model? | Model | undefined | |
offset | number | 0 | 未使用 可选参数,默认值为0 |
Returns
Promise
<boolean
>
异步返回是否加载成功
Description
获取mesh数据
Inherited from
getModelBoard
▸ getModelBoard(modelBoardId
): Promise
<ModelBoard
>
Parameters
Name | Type |
---|---|
modelBoardId | number |
Returns
Promise
<ModelBoard
>
Description
根据id获取单个看板对象