EDIT: BoundingBox-Vector subscript out of range error

孤街醉人 提交于 2019-12-25 07:46:02

问题


EDIT: I am facing a subscript problem. I managed to store the dimensions of all the bounding boxes to be created and tried using a for loop for creating bounding boxes in a row. I am using two non-zero Point3D vectors,namely center and extent, for arguments while creating the boxes. But I am getting a vector subscript out of range error while debugging. I tried the solution recommended on other questions but it's not working. Any ideas?

        std::vector<cetuc::BoundingBox> ObjectBox;
        std::vector<cetuc::Point3D> center;
        std::vector<cetuc::Point3D> extent;
        *center and extent are both non zero vectors*
        for(int z=0;z<center.size();z++)
        {
            ObjectBox[z] = cetuc::BoundingBox(center[z], extent[z], cetuc::Point3D(0, 0, 0));
        }

来源:https://stackoverflow.com/questions/43108052/edit-boundingbox-vector-subscript-out-of-range-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!