本文介绍了生成带有三角形条带的平面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!
问题描述
生成顶点列表以使用三角形条绘制平面的最佳算法是什么?
What would be the best algorithm to generate a list of vertices to draw a plane using triangle strips?
我正在寻找一个函数,它接收平面的宽度和高度并返回一个包含正确索引顶点的浮点数组.
I'm looking for a function which receives the plane's width and height and returns a float array containing correctly indexed vertices.
width 表示每行的顶点数.
width represents the number of vertices per row.
高度表示每列的顶点数.
height represents the number of vertices per column.
推荐答案
谢谢大家.我已经编码了这个.这是正确的吗?还是生成的条带有问题?
Thanks you all. I've coded this. Is it correct? Or is the generated strip somehow wrong?
width=4 和 height=4 这就是我得到的:
With width=4 and height=4 this is what I got:
这里我修改了一些顶点高度:
And here I'm modifying some vertex height:
这篇关于生成带有三角形条带的平面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!
本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!