A map road rendering method and device
A road and map technology, applied in the computer field, can solve problems such as sudden changes in road width, achieve smooth switching, good switching animation effects, and avoid sudden changes in roads.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0080] refer to figure 2 As shown, the map rendering method provided by Embodiment 1 of the present invention specifically includes the following steps:
[0081] Step 200: Obtain the levels before and after zooming according to the zoom command.
[0082] In practice, map rendering usually involves modeling roads on the CPU side to generate a series of triangles, and then uploading the index data of these triangles to the GPU side for direct rendering during rendering. However, in the prior art, for different types of roads , when zooming, a uniform zoom amount is used to zoom, and there will be a problem of road width mutation. For example, when the map is zoomed in, the scale becomes 2 times, and a switching animation will be triggered. In the prior art, the The map is zoomed in globally, and the range of the zoom factor is [1,2]. Then, when the switching animation ends, it directly switches to the road width corresponding to the new level. However, the road width before an...
Embodiment 2
[0147] Hereinafter, a specific application scenario is adopted to further describe the foregoing embodiment in detail. In the second embodiment of the present invention, the description can be divided into two parts.
[0148] 1) CPU side.
[0149] The road model is established on the CPU side, and the normal vector is added to each vertex, and the road width is 0 for modeling.
[0150] 2) Vertex shader. See for details Figure 4 As shown, the details are as follows:
[0151] Step 400: Obtain the rendering width of each frame of the road during the scaling process.
[0152] Specifically, during the scaling process, the calculated road width of each frame can be passed to the vertex shader through the glUniformlf interface, and the vertex shader can obtain the rendering width of each frame.
[0153] Step 401: According to the normal vector of each original vertex of the road and the rendering width of any frame of the road, respectively calculate the offset of each vertex o...
Embodiment 3
[0158] In the embodiment of the present invention, refer to Figure 5 Shown is a schematic diagram of a server architecture environment in Embodiment 3 of the present invention.
[0159] The server is connected to the user terminal, and map applications, such as Tencent Maps, are installed in the user terminal. The user zooms in or out on the map, and then the server performs calculations and other operations, and renders the map in the user terminal according to the results.
[0160] Wherein, the user terminal may be any smart device such as a mobile phone, a computer, or an ipad, and the third embodiment of the present invention only uses a mobile phone as an example for illustration.
[0161] For example, a user opens Tencent Maps on a mobile phone, and after querying a location, wants to zoom in on the map so that the location can be viewed more clearly. Double-tap the screen or slide with two fingers to zoom in on the map, and the server side calculates the road in the ma...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com