fixed error on empty mesh
This commit is contained in:
parent
f7dce1ceef
commit
db9b756e17
|
@ -78,6 +78,8 @@ public:
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
geomsh[ii] = geolib->GetEntity(ii)->GetMesh();
|
geomsh[ii] = geolib->GetEntity(ii)->GetMesh();
|
||||||
|
if (geomsh[ii]->GetFaceCount() > 0)
|
||||||
|
{
|
||||||
geomsh[ii]->Triangulate();
|
geomsh[ii]->Triangulate();
|
||||||
//geomsh[ii]->Get
|
//geomsh[ii]->Get
|
||||||
size_t dim = geomsh[ii]->GetFaceVertexCount() / geomsh[ii]->GetFaceCount();
|
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 isvalidwnorm = (m.HasPerWedgeNormal()) && (norm != NULL) && (norm->source->GetSourceStride() == 3);
|
||||||
bool isvalidnorm = (m.HasPerVertexNormal()) && (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;
|
FCDGeometryPolygonsInputList tet;
|
||||||
tmp->GetPolygons(pset)->FindInputs(FUDaeGeometryInput::TEXCOORD,tet);
|
tmp->GetPolygons(pset)->FindInputs(FUDaeGeometryInput::TEXCOORD,tet);
|
||||||
|
@ -210,6 +212,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//doc->WriteToFile("PincoPalla.dae");
|
//doc->WriteToFile("PincoPalla.dae");
|
||||||
delete doc;
|
delete doc;
|
||||||
|
|
Loading…
Reference in New Issue