简体   繁体   English

C#中的“规范化”过程

[英]“Normalize” procedure in C#

Could someone explain to me what the normalization procedure for 3D surface mesh in C# is? 有人可以向我解释C#中3D表面网格的规范化过程是什么?

In a reference book, there is a line as follows : 在参考书中,有如下一行:

The GetNormalize method is used to map the region of your surface into a region of [-1, 1], which gives you a better view on your screen. GetNormalize方法用于将表面区域映射到[-1,1]区域,从而可以在屏幕上获得更好的视图。

You calculate the box bounding your surface mesh, get the longest side of the box and scale everything down by that value. 您可以计算出以曲面网格为边界的框,获得框的最长边,然后按该值将所有内容按比例缩小。 The result will be [0,1] for that side and [0,<1] for the rest. 该侧的结果为[0,1],其余部分的结果为[0,<1]。

If you need [-1,1], you double everything and substract 1, getting [0,1]*2-1=[0,2]-1=[-1,1]. 如果需要[-1,1],则将所有内容加倍并减去1,得到[0,1] * 2-1 = [0,2] -1 = [-1,1]。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM