float cur_dist;
glm::vec3 cur_norm;
if (type.shape->Intersects(ray, M * ToTransform(Pos(x, y, z), idx), cur_dist, cur_norm)) {
float cur_dist;
glm::vec3 cur_norm;
if (type.shape->Intersects(ray, M * ToTransform(Pos(x, y, z), idx), cur_dist, cur_norm)) {