原文地址:点击打开链接
Viewer request volume 视景器请求体
A tile's viewerRequestVolume
can be used for combining heterogeneous datasets, and can be combined with external tilesets.
一个瓦片的viewerRequestVolume
可用于兼容异构数据集和外部瓦片集。
The following example has a building in a b3dm
tile and a point cloud inside the building in a pnts
tile. The point cloud tile's boundingVolume
is a sphere with a radius of 1.25
. It also has a larger sphere with a radius of 15
for the viewerRequestVolume
. Since the geometricError
is zero, the point cloud tile's content is always rendered (and initially requested) when the viewer is inside the large sphere defined by viewerRequestVolume
.
下面的示例中有一个建筑物在b3dm文件中,一个建筑物中的点云在pnts文件中。点云瓦片的boundingVolume是一个半径1.25的球,它还有一个半径15的球作为viewerRequestVolume。由于geometricError的值为0,当视景器进入viewerRequestVolume
定义的较大球体时,点云数据从最初请求开始一直被渲染出来。
"children": [{
"transform": [
4.843178171884396, 1.2424271388626869, 0, 0,
-0.7993325488216595, 3.1159251367235608, 3.8278032889280675, 0,
0.9511533376784163, -3.7077466670407433, 3.2168186118075526, 0,
1215001.7612985559, -4736269.697480114, 4081650.708604793, 1
],
"boundingVolume": {
"box": [
0, 0, 6.701,
3.738, 0, 0,
0, 3.72, 0,
0, 0, 13.402
]
},
"geometricError": 32,
"content": {
"url": "building.b3dm"
}
}, {
"transform": [
0.968635634376879, 0.24848542777253732, 0, 0,
-0.15986650990768783, 0.6231850279035362, 0.7655606573007809, 0,
0.19023066741520941, -0.7415493329385225, 0.6433637229384295, 0,
1215002.0371330238, -4736270.772726648, 4081651.6414821907, 1
],
"viewerRequestVolume": {
"sphere": [0, 0, 0, 15]
},
"boundingVolume": {
"sphere": [0, 0, 0, 1.25]
},
"geometricError": 0,
"content": {
"url": ""
}
}]
文件
defines a tileset. Here is a subset of the used for Canary Wharf (also see the complete ):
定义一个瓦片集。下面是Canary Wharf的文件中一部分:
{
"asset" : {
"version": "0.0",
"tilesetVersion": "e575c6f1-a45b-420a-b172-6449fa6e0a59",
"gltfUpAxis": "Y"
},
"properties": {
"Height": {
"minimum": 1,
"maximum": 241.6
}
},
"geometricError": 494.50961650991815,
"root": {
"boundingVolume": {
"region": [
-0.0005682966577418737,
0.8987233516605286,
0.00011646582098558159,
0.8990603398325034,
0,
241.6
]
},
"geometricError": 268.37878244706053,
"content": {
"url": "0/0/0.b3dm",
"boundingVolume": {
"region": [
-0.0004001690908972599,
0.8988700116775743,
0.00010096729722787196,
0.8989625664878067,
0,
241.6
]
}
},
"children": [..]
}
}
The top-level object in has four properties: asset
, properties
, geometricError
, and root
.
的*对象有四个属性:asset,properties,geometricError和root。
asset
is an object containing properties with metadata about the entire tileset. Its version
property is a string that defines the 3D Tiles version. The version defines the JSON schema for and the base set of tile formats. The tilesetVersion
property is an optional string that defines an application-specific version of a tileset, ., for when an existing tileset is updated. The gltfUpAxis
property is an optional string that specifies the up-axis of glTF models contained in the tileset.
asset对象包含整个瓦片集元数据属性,它的version属性是一个定义3D Tiles版本的字符串。版本定义了的JSON模式和瓦片格式的基本集合。tilesetVersion
是一个可选的字符串属性,定义瓦片集的专业版本号,例如用于当前瓦片集更新时。gltfUpAxis属性是一个可选的字符串属性,指定瓦片集中glTF模型的向上坐标轴。
properties
is an object containing objects for each per-feature property in the tileset. This snippet is for 3D buildings, so each tile has building models, and each building model has a Height
property (see Batch Table). The name of each object in properties
matches the name of a per-feature property, and defines its minimum
and maximum
numeric values, which are useful, for example, for creating color ramps for styling.
properties
是一个对象,包含了瓦片集中每一个要素属性对象。上述片段是针对3D建筑物的,所以每个瓦片都有建筑物模型,每个建筑物模型都有Height属性。properties
属性中每个对象的名字都和要素属性的名字相匹配,并且定义了它的minimum
最小和maximum
最大数值,用于为样式创建色带时。
geometricError
is a nonnegative number that defines the error, in meters, when the tileset is not rendered.
geometricError
属性是一个非负数字,定义了一个以米为单位的误差,在这个误差下瓦片集不被渲染。
root
is an object that defines the root tile using the JSON described in the above section. is not the same as 's top-level
geometricError
. 's geometricError
is the error when the entire tileset is not rendered; is the error when only the root tile is rendered.
root是一个定义根瓦片的对象。
与中顶层
geometricError
不同。后者是整个瓦片集不被渲染的误差,前者是只有根瓦片被渲染的误差。
is an array of objects that define child tiles. Each child tile has a
boundingVolume
fully enclosed by its parent tile's boundingVolume
and, generally, a geometricError
less than its parent tile's geometricError
. For leaf tiles, the length of this array is zero, and children
may not be defined.
是定义子瓦片的对象数组。每个子瓦片都有一个被其父瓦片
boundingVolume包围的
boundingVolume
和一个通常小于父瓦片geometricError
的geometricError
。对于叶子瓦片的长度是0,children可能未定义。