QQ聊天

Max里,Mesh真是高级自由度啊

今天发现,max自己的茶壶的Mesh,存在一个面有两个点的索引相同的情况。啊哈哈哈,mesh真是什么结构都有。有兴趣的可以试一下

View Code
    for (int i=0; i<GetCOREInterface()->GetSelNodeCount(); i++)
{
Object
* selectObject = ip->GetSelNode(i)->GetObjectRef();
TriObject
*tri = (TriObject *)selectObject->ConvertToType(ip->GetTime(),Class_ID(TRIOBJ_CLASS_ID, 0));
Mesh tempMesh
= tri->GetMesh();
int faceCount = tempMesh.numFaces;
for (int fi = 0;fi<faceCount;++fi)
{
Face tempface
= tempMesh.faces[fi];
char v1char[10] = {'0'};
DWORD v1
= tempface.v[0];
ultoa(v1,v1char,
10);

char v2char[10] = {'0'};
DWORD v2
= tempface.v[1];
ultoa(v2,v2char,
10);

char v3char[10] = {'0'};
DWORD v3
= tempface.v[2];
ultoa(v3,v3char,
10);

char fichar[10] = {'0'};
ultoa(fi,fichar,
10);

mputs(
"fi : ");
mputs(fichar);
mputs(
" | ");
mputs(v1char);
mputs(
" , ");

mputs(v2char);
mputs(
" , ");

mputs(v3char);
mputs(
"\r\n");
}

  

posted @ 2011-09-06 17:54  SITT  阅读(630)  评论(0编辑  收藏  举报
QQ聊天