Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of excavation in TE Development

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you the "Example Analysis of Excavation in TE Development". The content is simple, easy to understand and clearly organized. I hope it can help you solve your doubts. Let Xiaobian lead you to study and learn the article "Example Analysis of Excavation in TE Development".

In TE development, the system sometimes requires you to view the model effects of some underground pipelines, pipe galleries, ore bodies, etc. without opening the underground mode. TE provides the function of digging holes, which is simply to dig a hole in the terrain. The effect of using API direct development is to dig underground. It is a gray effect, as shown in the following figure:

If there is a model effect underground, you can view it, but the effect of the foil is a bit poor. In this case, you can set a depth, create an irregular cube, paste the cube with a map, and include the range below, as shown below:

The effect looks more intuitive.

Here is how to do it:

First, select a range on the map, that is, draw a polygon on the map. Please refer to TE Secondary Development Drawing Polygon of this public number, but the polygon drawn cannot be self-intersecting (the following picture is self-intersecting polygon).

After polygon delineation is completed, you need to achieve the effect of digging the terrain. Use the method SGWorld.Creator.CreateHoleOnTerrain(polygon coordinates, group number, name) to create a digging effect on the map first. Only by digging the terrain can you see the bottom.

Next, create a polygon object, because in TE, when the polygon is not displayed on the ground, there is an attribute ExtendToGround, which can directly turn a surface into a three-dimensional effect. To achieve the underground effect, you need to set the polygon elevation lower than the ground surface, and then pass the following attributes:

polygon.LineStyle.Color.SetAlpha(0);

polygon.FillStyle.Color.SetAlpha(1);

polygon.FillStyle.Texture.FileName = absolute path to picture file;

The underground excavation effect with mapping can be achieved.

The above is all the content of this article "TE development excavation example analysis", thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report