From 6db0c58e8f3b6e3255a47db00d11b742a91651ff Mon Sep 17 00:00:00 2001 From: Mario Luzeiro Date: Sun, 27 Sep 2020 15:52:05 +0100 Subject: [PATCH] 3D-Viewer: fix some code style --- .../c3d_render_createscene.cpp | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp b/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp index bb8eb8ba01..c2635e9fae 100644 --- a/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp +++ b/3d-viewer/3d_rendering/3d_render_raytracing/c3d_render_createscene.cpp @@ -1427,12 +1427,12 @@ MODEL_MATERIALS *C3D_RENDER_RAYTRACING::get_3D_model_material( const S3DMODEL *a { // Guess material type and apply a normal perturbator - if( ( RGBtoGray(material.m_Diffuse) < 0.3f ) && + if( ( RGBtoGray( material.m_Diffuse ) < 0.3f ) && ( material.m_Shininess < 0.36f ) && ( material.m_Transparency == 0.0f ) && - ( (glm::abs( material.m_Diffuse.r - material.m_Diffuse.g ) < 0.15f) && - (glm::abs( material.m_Diffuse.b - material.m_Diffuse.g ) < 0.15f) && - (glm::abs( material.m_Diffuse.r - material.m_Diffuse.b ) < 0.15f) ) ) + ( ( glm::abs( material.m_Diffuse.r - material.m_Diffuse.g ) < 0.15f ) && + ( glm::abs( material.m_Diffuse.b - material.m_Diffuse.g ) < 0.15f ) && + ( glm::abs( material.m_Diffuse.r - material.m_Diffuse.b ) < 0.15f ) ) ) { // This may be a black plastic.. @@ -1443,24 +1443,24 @@ MODEL_MATERIALS *C3D_RENDER_RAYTRACING::get_3D_model_material( const S3DMODEL *a } else { - if( ( RGBtoGray(material.m_Diffuse) > 0.3f ) && + if( ( RGBtoGray( material.m_Diffuse ) > 0.3f ) && ( material.m_Shininess < 0.30f ) && ( material.m_Transparency == 0.0f ) && - ( (glm::abs( material.m_Diffuse.r - material.m_Diffuse.g ) > 0.25f) || - (glm::abs( material.m_Diffuse.b - material.m_Diffuse.g ) > 0.25f) || - (glm::abs( material.m_Diffuse.r - material.m_Diffuse.b ) > 0.25f) ) ) + ( ( glm::abs( material.m_Diffuse.r - material.m_Diffuse.g ) > 0.25f ) || + ( glm::abs( material.m_Diffuse.b - material.m_Diffuse.g ) > 0.25f ) || + ( glm::abs( material.m_Diffuse.r - material.m_Diffuse.b ) > 0.25f ) ) ) { // This may be a color plastic ... blinnMaterial.SetNormalPerturbator( &m_plastic_shine_normal_perturbator ); } else { - if( ( RGBtoGray(material.m_Diffuse) > 0.6f ) && + if( ( RGBtoGray( material.m_Diffuse ) > 0.6f ) && ( material.m_Shininess > 0.35f ) && ( material.m_Transparency == 0.0f ) && - ( (glm::abs( material.m_Diffuse.r - material.m_Diffuse.g ) < 0.40f) && - (glm::abs( material.m_Diffuse.b - material.m_Diffuse.g ) < 0.40f) && - (glm::abs( material.m_Diffuse.r - material.m_Diffuse.b ) < 0.40f) ) ) + ( ( glm::abs( material.m_Diffuse.r - material.m_Diffuse.g ) < 0.40f ) && + ( glm::abs( material.m_Diffuse.b - material.m_Diffuse.g ) < 0.40f ) && + ( glm::abs( material.m_Diffuse.r - material.m_Diffuse.b ) < 0.40f ) ) ) { // This may be a brushed metal blinnMaterial.SetNormalPerturbator( &m_brushed_metal_normal_perturbator );