问题
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