fixed error on empty mesh

This commit is contained in:
granzuglia 2006-06-19 15:13:10 +00:00
parent f7dce1ceef
commit db9b756e17
1 changed files with 114 additions and 111 deletions

View File

@ -78,6 +78,8 @@ public:
else
{
geomsh[ii] = geolib->GetEntity(ii)->GetMesh();
if (geomsh[ii]->GetFaceCount() > 0)
{
geomsh[ii]->Triangulate();
//geomsh[ii]->Get
size_t dim = geomsh[ii]->GetFaceVertexCount() / geomsh[ii]->GetFaceCount();
@ -117,7 +119,7 @@ public:
bool isvalidwnorm = (m.HasPerWedgeNormal()) && (norm != NULL) && (norm->source->GetSourceStride() == 3);
bool isvalidnorm = (m.HasPerVertexNormal()) && (norm != NULL) && (norm->source->GetSourceStride() == 3);
bool isvalidtext = (m.HasPerWedgeTexture()) && (text != NULL) && (text->source->GetSourceStride() == 2);
bool isvalidtext = (HasPerWedgeTexture(m)) && (text != NULL) && (text->source->GetSourceStride() == 2);
FCDGeometryPolygonsInputList tet;
tmp->GetPolygons(pset)->FindInputs(FUDaeGeometryInput::TEXCOORD,tet);
@ -210,6 +212,7 @@ public:
}
}
}
}
//doc->WriteToFile("PincoPalla.dae");
delete doc;