A vector/vertex 但具有整数值

A vector/vertex but with integer values

我需要类似于 QVector3D 类型但具有整数值的东西。

意思是,而不是:

QVector3D(float xpos, float ypos, float zpos)

我需要:

QVector3i(int first, int second, int third)

Qt有这样的类型吗?如果没有,最好的解决方法是什么?

感谢@idclev463035818 的建议,std::array<int, 3> 帮我完成了这项工作。