for (int i = 0; i < numVertices; i++)
{
- buffer[elementsSize*i] = (float)coordinates[3*i];
- buffer[elementsSize*i +1] = (float)coordinates[3*i+1];
- buffer[elementsSize*i +2] = (float)coordinates[3*i+2];
+ if (coordinateMask & 0x1)
+ {
+ double xi = coordinates[3 * i];
+ if (logMask & 0x1)
+ {
+ xi = DecompositionUtils::getLog10Value(xi);
+ }
+ buffer[elementsSize * i] = (float)(xi * scale[0] + translation[0]);
+ }
- if (elementsSize == 4)
+ if (coordinateMask & 0x2)
+ {
+ double yi = coordinates[3 * i + 1];
+ if (logMask & 0x2)
+ {
+ yi = DecompositionUtils::getLog10Value(yi);
+ }
+ buffer[elementsSize * i + 1] = (float)(yi * scale[1] + translation[1]);
+ }
+
+ if (coordinateMask & 0x4)
+ {
+ double zi = coordinates[3 * i + 2];
+ if (logMask & 0x4)
+ {
+ zi = DecompositionUtils::getLog10Value(zi);
+ }
+ buffer[elementsSize * i + 2] = (float)(zi * scale[2] + translation[2]);
+ }
+
+ if (elementsSize == 4 && (coordinateMask & 0x8))
{
- buffer[elementsSize*i +3] = 1.0;
+ buffer[elementsSize * i + 3] = 1.0;
}
}
if (colorRange[0] != 0 || colorRange[1] != 0)
{
- colorsNumber = (double) (1 + colorRange[1] - colorRange[0]);
+ colorsNumber = (double) (1 + colorRange[1] - colorRange[0]);
}
else
{
- colorsNumber = (double) colormapSize;
+ colorsNumber = (double) colormapSize;
}
/** To take into account the presence of exterior colors:
}
else
{
- /* To do: replace 0.5 by a macro-definition */
+ /* To do: replace 0.5 by a macro-definition */
ColorComputer::getColor(values[i], minValue, valueRange, 0.5, colormap, minColorIndex, maxColorIndex, colormapSize, &buffer[bufferOffset]);
}