struct vec3
{
float elem[3];
float &x, &y, &z;
vec3() : x(elem[0]), y(elem[1]), z(elem[2]) { }
};
これだけのことだろ