I need to render a couple of cubes by opengl, and the color of every cube depends on the the magnetic field at the center of cube, but I don't know how to convert the float number into the QVector3D
or glm::vec3 (RGB)
.
And I can convert the range of the float array between 0 and 1, I need to know how to convert the magnetic field array to RGB to define the color array.