其他分享
首页 > 其他分享> > 点云最小包围盒

点云最小包围盒

作者:互联网

点云最小包围盒

int w = indexPTSObj->getW();
int h = indexPTSObj->getH();

double    x = indexPTSObj->getX();
double    y = indexPTSObj->getY();
double    z = indexPTSObj->getZ();

int r = indexPTSObj->getR();
int g = indexPTSObj->getG();
int b = indexPTSObj->getB();

if (k==0) {
    minX = x;
    maxX = x;

    minY = y;
    maxY = y;

    minZ = z;
    maxZ = z;
}
else 
{
    if (x<minX) {
        minX = x;
    }
    if (x>maxX) {
        maxX = x;
    }

    if (y<minY) {
        minY = y;
    }
    if (y>maxY) {
        maxY = y;
    }

    if (z<minZ) {
        minZ = z;
    }
    if (z>maxZ) {
        maxZ = z;
    }
}

 

 

 

 

 

#####################

标签:maxZ,indexPTSObj,maxX,maxY,int,double,最小,点云,包围
来源: https://www.cnblogs.com/herd/p/16157553.html