In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the Cesium development model of the CZML file what is useful, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
CZML is a language used to describe the JSON architecture of dynamic scenes, mainly for the presentation of Cesium in browsers. Through the production of CZML files, the batch loading of data is carried out in Cesium, eliminating the need to cycle through one loading object separately. Here is a simple configuration of the model CZML file:
CZML is a JSON file in the form of an array. It first has a root node with id, name and version inside. When you modify it, you only need to set the name.
Each of the following objects is a parameter configuration of the model:
Id must be unique, name can have the same, properties can add some custom attribute data, position is the location information of the model, orientation is the corner information of the model (heading, pitch, roll), and model is the path, scale and other parameter configuration of the model. Orientation needs to calculate an array of 4 elements based on the model coordinates and rotation angles. The code is as follows:
Let position = Cesium.Cartesian3.fromDegrees (evdata.x, evdata.y, evdata.height)
Let heading = Cesium.Math.toRadians (evdata.heading)
Let pitch = evdata.pitch
Let roll = 0
Let hpr = new Cesium.HeadingPitchRoll (heading, pitch, roll)
Let orentation = Cesium.Transforms.headingPitchRollQuaternion (position, hpr)
/ / czml style file of the model
[
{
"id": "document"
"name": "name"
Version: 1. 0
}
{
"id": "uid1"
"name": "uid"
"properties": {
"status": "use"
}
"position": {
"cartographicDegrees": [
116.119
39.1112
1.01
]
}
"orientation": {
"unitQuaternion": [0pr 0pl 0pl 0pl 0]
}
"model": {
"gltf": "Model path"
"scale": 1.0
"minimumPixelSize": 16
}
}]
Thank you for reading this article carefully. I hope the article "what is the use of CZML files of models in Cesium development" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.