Two options come to mind:
- Declare normals in the class definition (which is what you're already doing) then define and initialise it in exactly one source file rather than in the header (i.e., move it from the header to exactly one source file).
- Declare normals with constexpr and define and initialise it in the class definition:
Of course, I'm assuming that SQRT3_3 can be used in a constexpr context, e.g., it is itself a constexpr, a const initialised at compile time, an enum, a macro constant.Code:static constexpr Vec3f normals[7] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {SQRT3_3, SQRT3_3, SQRT3_3}, {-SQRT3_3, SQRT3_3, SQRT3_3}, {-SQRT3_3, -SQRT3_3, SQRT3_3}, {SQRT3_3, -SQRT3_3, SQRT3_3}};