mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:37:51 +02:00
Clean up coding standard violations
This commit is contained in:
parent
93106be466
commit
d4367924ad
1 changed files with 24 additions and 17 deletions
|
@ -28,20 +28,21 @@ bool vhacd::VHACDUtil::loadFBX(const QString filename, vhacd::LoadFBXResults *re
|
|||
//results->meshCount = geometry.meshes.count();
|
||||
|
||||
int count = 0;
|
||||
foreach(FBXMesh mesh, geometry.meshes) {
|
||||
foreach(FBXMesh mesh, geometry.meshes){
|
||||
//get vertices for each mesh
|
||||
QVector<glm::vec3> vertices = mesh.vertices;
|
||||
|
||||
//get the triangle indices for each mesh
|
||||
QVector<int> triangles;
|
||||
foreach(FBXMeshPart part, mesh.parts) {
|
||||
foreach(FBXMeshPart part, mesh.parts){
|
||||
QVector<int> indices = part.triangleIndices;
|
||||
triangles += indices;
|
||||
}
|
||||
|
||||
//only read meshes with triangles
|
||||
if (triangles.count() <= 0)
|
||||
if (triangles.count() <= 0){
|
||||
continue;
|
||||
}
|
||||
results->perMeshVertices.append(vertices);
|
||||
results->perMeshTriangleIndices.append(triangles);
|
||||
count++;
|
||||
|
@ -55,7 +56,7 @@ bool vhacd::VHACDUtil::computeVHACD(vhacd::LoadFBXResults *meshes, VHACD::IVHACD
|
|||
VHACD::IVHACD * interfaceVHACD = VHACD::CreateVHACD();
|
||||
int meshCount = meshes->meshCount;
|
||||
int count = 0;
|
||||
std::cout << "Performing V-HACD computation on " << meshCount <<" meshes ..... " << std::endl;
|
||||
std::cout << "Performing V-HACD computation on " << meshCount << " meshes ..... " << std::endl;
|
||||
|
||||
for (int i = 0; i < meshCount; i++){
|
||||
|
||||
|
@ -92,10 +93,13 @@ bool vhacd::VHACDUtil::computeVHACD(vhacd::LoadFBXResults *meshes, VHACD::IVHACD
|
|||
interfaceVHACD->Clean();
|
||||
interfaceVHACD->Release();
|
||||
|
||||
if (count > 0)
|
||||
if (count > 0){
|
||||
return true;
|
||||
else
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
vhacd::VHACDUtil:: ~VHACDUtil(){
|
||||
|
@ -107,15 +111,18 @@ void vhacd::ProgressCallback::Update(const double overallProgress, const double
|
|||
const char * const stage, const char * const operation){
|
||||
int progress = (int)(overallProgress + 0.5);
|
||||
|
||||
if (progress < 10)
|
||||
if (progress < 10){
|
||||
std::cout << "\b\b";
|
||||
else
|
||||
}
|
||||
else{
|
||||
std::cout << "\b\b\b";
|
||||
}
|
||||
|
||||
std::cout << progress << "%";
|
||||
|
||||
if (progress >= 100)
|
||||
if (progress >= 100){
|
||||
std::cout << std::endl;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
vhacd::ProgressCallback::ProgressCallback(void){}
|
||||
|
|
Loading…
Reference in a new issue