0
我希望我的課Vector3f
存儲我的立方體(由三角形構成)的索引指針。是否有可能使用一個向量opengl頂點數組?
繼承人什麼我會推向向量。
vector<Vector3f> I;
I.push_back(Vector3f(1, 0, 2)); //front
I.push_back(Vector3f(2, 0, 3));
I.push_back(Vector3f(4, 5, 7)); //back
I.push_back(Vector3f(7, 5, 6));
I.push_back(Vector3f(0, 4, 3)); //left
I.push_back(Vector3f(3, 4, 7));
I.push_back(Vector3f(5, 1, 6)); //right
I.push_back(Vector3f(6, 1, 2));
I.push_back(Vector3f(7, 6, 3)); //up
I.push_back(Vector3f(3, 6, 2));
I.push_back(Vector3f(1, 0, 5)); //down
I.push_back(Vector3f(5, 0, 4));
頂點數組可以從類讀取嗎?