In max, mesh is really a high-level degree of freedom.

Source: Internet
Author: User

Today, we found that the mesh of Max's teapot has two points with the same index on one side. Ah, hahaha, mesh really has all the structures. If you are interested, try it.

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");
}

  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.