Room
房间应用(用于获取房间属性或空间关系计算)
Constructor
new Glodon.Bimface.Earth.Plugins.Rooms.Room(roomConfig)
Parameters:
| Name | Type | Description |
|---|---|---|
| roomConfig | Glodon.Bimface.Earth.Plugins.Rooms.RoomConfig | 房间应用配置项 |
Methods
enableDepthTest(isEnabled)
房间是否开启深度检测
Parameters:
| Name | Type | Description |
|---|---|---|
| isEnabled | Boolean | 是否开启深度检测 |
getArea()
获取房间底面积
Returns:
| Type | Description |
|---|---|
| Object | 房间面积信息 |
getBoundary()
获取房间边界
Returns:
| Type | Description |
|---|---|
| Object | 房间边界,各点由经纬度+高度表示 |
getColor()
获取房间颜色
Returns:
| Type | Description |
|---|---|
| Object | color为房间颜色,frameColor为房间线框颜色。例如:{color: new Glodon.Web.Graphics.Color(0, 255, 255, 1), frameColor: new Glodon.Web.Graphics.Color(255, 0, 0, 1)} |
getHeight()
获取房间高度(针对拉伸体)
Returns:
| Type | Description |
|---|---|
| Number | 房间高度,单位为m |
setBoundary(newBoundary)
根据新的Boundary生成房间(针对拉伸体)
Parameters:
| Name | Type | Description |
|---|---|---|
| newBoundary | Object | 新的房间边界,边界点由经纬度组成,例如: {outer: [{lat: 31.221, lon: 119.2323, alt: 0}], inner: [[{lat: 31.224, lon: 119.2324, alt: 0}]]} |
setColor(colorOption)
设置房间的颜色
Parameters:
| Name | Type | Description |
|---|---|---|
| colorOption | Object | color为房间颜色,frameColor为房间线框颜色,例如:{color: new Glodon.Web.Graphics.Color(0, 255, 255, 1), frameColor: new Glodon.Web.Graphics.Color(255, 0, 0, 1)} |
setHeight(height)
设置房间的高度(针对拉伸体)
Parameters:
| Name | Type | Description |
|---|---|---|
| height | Number | 房间高度, 单位为m |
← Plane RoomConfig →