Using hex instead of decimal

pull/4541/head
Piroska Gabor 2022-05-26 10:11:30 +02:00
parent 7ce447294f
commit ddc63119b5
1 changed files with 6 additions and 6 deletions

View File

@ -517,13 +517,13 @@ bool STLImporter::LoadBinaryFile() {
const ai_real invVal((ai_real)1.0 / (ai_real)31.0);
if (bIsMaterialise) // this is reversed
{
clr->r = (color & 31u) * invVal;
clr->g = ((color & (31u << 5)) >> 5u) * invVal;
clr->b = ((color & (31u << 10)) >> 10u) * invVal;
clr->r = (color & 0x1fu) * invVal;
clr->g = ((color & (0x1fu << 5)) >> 5u) * invVal;
clr->b = ((color & (0x1fu << 10)) >> 10u) * invVal;
} else {
clr->b = (color & 31u) * invVal;
clr->g = ((color & (31u << 5)) >> 5u) * invVal;
clr->r = ((color & (31u << 10)) >> 10u) * invVal;
clr->b = (color & 0x1fu) * invVal;
clr->g = ((color & (0x1fu << 5)) >> 5u) * invVal;
clr->r = ((color & (0x1fu << 10)) >> 10u) * invVal;
}
// assign the color to all vertices of the face
*(clr + 1) = *clr;