Set primitive_type to point when PLY is a point cloud

This commit is contained in:
Alexandre Avenel
2018-03-04 00:12:53 +01:00
parent f053695176
commit 15fa86f100
2 changed files with 6 additions and 0 deletions

View File

@@ -244,6 +244,9 @@ void PLYImporter::InternReadFile(const std::string& pFile, aiScene* pScene, IOSy
// if no face list is existing we assume that the vertex
// list is containing a list of points
bool pointsOnly = mGeneratedMesh->mFaces == NULL ? true : false;
if (pointsOnly) {
mGeneratedMesh->mPrimitiveTypes = aiPrimitiveType::aiPrimitiveType_POINT;
}
// now load a list of all materials
std::vector<aiMaterial*> avMaterials;