首页 / 浏览问题 / 三维GIS / 问题详情
线贴S3M对象的会贴到entity对象上
21EXP 2020年12月29日

线贴S3M对象的时候会贴到entity的model对象上,实际上不想贴在entity的model上

1个回答

你好,设置gltf:classificationType: Cesium.ClassificationType.BOTH

设置线:classificationType: Cesium.ClassificationType.S3M_TILE

代码

var gltf = viewer.entities.add({
							name: "gltf",
							position: new Cesium.Cartesian3.fromDegrees(116.44537480546128,39.905157251908975,5),
							model: {
								uri: "./SampleData/gltf/man/walk.gltf",
								clampToGround: true,
								classificationType: Cesium.ClassificationType.BOTH					
							},
							//clampToS3M: true
						});

						
						var yellowLine = viewer.entities.add({
							name: 'Red line on the surface',
							corridor: {
								positions: Cesium.Cartesian3.fromDegreesArray([116.44537480546128,39.905157251908975,116.44647962962192,39.90320512482473]),
								width: 0.1,
								material: Cesium.Color.RED,
								//clampToGround: true,
								classificationType: Cesium.ClassificationType.S3M_TILE
							},
							clampToS3M: true
						});

						viewer.zoomTo(gltf);

6,087EXP 2020年12月29日
...