标题:请问:怎样求法线及光照计算?
只看楼主
hwbnet
Rank: 1
等 级:新手上路
威 望:2
帖 子:355
专家分:0
注 册:2004-12-9
 问题点数:0 回复次数:0 
请问:怎样求法线及光照计算?
假设有这样一组顶点:
d=-1;
ff[d=d+1]=0.0f,ff[d=d+1]=0.0f,ff[d=d+1]=0.0f;
for(i=0;i<9;i++)
{
f[0]=(2*D3DX_PI*i)/8;
ff[d=d+1]=cosf(f[0])*3.0f,ff[d=d+1]=sinf(f[0])*3.0f,ff[d=d+1]=-10.0f;
}
三角形索引为:
d=-1;
sy[d=d+1]=0,sy[d=d+1]=1,sy[d=d+1]=2;
sy[d=d+1]=0,sy[d=d+1]=2,sy[d=d+1]=3;
sy[d=d+1]=0,sy[d=d+1]=3,sy[d=d+1]=4;
sy[d=d+1]=0,sy[d=d+1]=4,sy[d=d+1]=5;
sy[d=d+1]=0,sy[d=d+1]=5,sy[d=d+1]=6;
sy[d=d+1]=0,sy[d=d+1]=6,sy[d=d+1]=7;
sy[d=d+1]=0,sy[d=d+1]=7,sy[d=d+1]=8;
sy[d=d+1]=0,sy[d=d+1]=8,sy[d=d+1]=9;
请问:如何求这10个顶点的法线?
搜索更多相关主题的帖子: 光照 法线 光照 法线 
2007-10-08 21:53



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-175952-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.399491 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved