コード例 #1
0
    void clearImage()
        {
            if(imageView){
                Image image;
                image.clear();
                image.setSize(1,1,3);
                *image.pixels() = 0;
                imageView->setImage(image);
            }

            if(pointSetFromRangeCamera){
                pointSetFromRangeCamera->getOrCreateVertices()->clear();
                pointSetFromRangeCamera->getOrCreateColors()->clear();
            }

            if(pointSetFromRangeSensor){
                pointSetFromRangeSensor->getOrCreateVertices()->clear();
                pointSetFromRangeSensor->getOrCreateColors()->clear();
            }
        }
コード例 #2
0
    void updatePointCloudFromRangeSensor()
        {
            if(!pointSetFromRangeSensor)
                return;

            SgVertexArray& disPoints = *pointSetFromRangeSensor->getOrCreateVertices();

            boost::mutex::scoped_lock lock(mtx);
            disPoints.resize(rangeSensorPoints.size());
            copy(rangeSensorPoints.begin(), rangeSensorPoints.end(), disPoints.begin());
            lock.unlock();

            pointSetFromRangeSensor->notifyUpdate();
        }
コード例 #3
0
    void updatePointCloudFromRangeCamera()
        {
            if(!pointSetFromRangeCamera)
                return;

            SgVertexArray& disPoints = *pointSetFromRangeCamera->getOrCreateVertices();
            SgColorArray& disColors = *pointSetFromRangeCamera->getOrCreateColors();

            boost::mutex::scoped_lock lock(mtx);
            disPoints.resize(rangeCameraPoints.size());
            disColors.resize(rangeCameraColors.size());
            copy(rangeCameraPoints.begin(), rangeCameraPoints.end(), disPoints.begin());
            copy(rangeCameraColors.begin(), rangeCameraColors.end(), disColors.begin());
            lock.unlock();

            pointSetFromRangeCamera->notifyUpdate();

        }