当前位置: 首页>>代码示例>>C++>>正文


C++ CellList::push_back方法代码示例

本文整理汇总了C++中CellList::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ CellList::push_back方法的具体用法?C++ CellList::push_back怎么用?C++ CellList::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CellList的用法示例。


在下文中一共展示了CellList::push_back方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: emit

    // Return the list of cells crossed when moving from the start point
    // to the end point.
    CellList emit()
    {
        CellList cells;

        int gridX = xcell(m_xstart);
        int gridY = ycell(m_ystart);

        int xlast = xcell(m_xend);
        int ylast = ycell(m_yend);

        cells.push_back( {gridX, gridY} );
        while (gridX != xlast || gridY != ylast)
        {
            if (m_tMaxX < m_tMaxY)
            {
                m_tMaxX += m_tDeltaX;
                gridX += m_stepX;
            }
            else
            {
                m_tMaxY += m_tDeltaY;
                gridY += m_stepY;
            }
            cells.push_back( { gridX, gridY } );
        }
        return cells;
    }
开发者ID:PDAL,项目名称:PDAL,代码行数:29,代码来源:VoxelRayTrace.hpp

示例2: cellList

SqlitePage::CellList SqlitePage::cellList() {
    CellList cellList;
    CellPointers cellPtrs = cellPointers();
    for (CellPointers::iterator pos = cellPtrs.begin();
         pos != cellPtrs.end(); ++pos) {
        CellInfo cellInfo;
        cellInfo.offset = *pos;
        base::varint_t vint_playload = parseVarint(page_.begin() + *pos, page_.end());
        base::varint_t vint_rowid = parseVarint(page_.begin() + *pos + vint_playload.length, page_.end());
        cellInfo.length = vint_playload.value + vint_playload.length + vint_rowid.length;
        cellList.push_back(cellInfo);
    }
    return cellList;
}
开发者ID:wenjinchoi,项目名称:SqliteCarving,代码行数:14,代码来源:SqlitePage.cpp

示例3:

void ForestTechniqueManager::Cell::bin()
{
    // put trees in appropriate cells.
    TreeList treesNotAssigned;
    for(TreeList::iterator titr=_trees.begin();
        titr!=_trees.end();
        ++titr)
    {
        Tree* tree = titr->get();
        bool assigned = false;
        for(CellList::iterator citr=_cells.begin();
            citr!=_cells.end() && !assigned;
            ++citr)
        {
            if ((*citr)->contains(tree->_position))
            {
                (*citr)->addTree(tree);
                assigned = true;
            }
        }
        if (!assigned) treesNotAssigned.push_back(tree);
    }

    // put the unassigned trees back into the original local tree list.
    _trees.swap(treesNotAssigned);


    // prune empty cells.
    CellList cellsNotEmpty;
    for(CellList::iterator citr=_cells.begin();
        citr!=_cells.end();
        ++citr)
    {
        if (!((*citr)->_trees.empty()))
        {
            cellsNotEmpty.push_back(*citr);
        }
    }
    _cells.swap(cellsNotEmpty);


}
开发者ID:yueying,项目名称:osg,代码行数:42,代码来源:osgforest.cpp

示例4: visit

    virtual void visit(AstCell* nodep, AstNUser*) {
	// Must do ifaces first, so push to list and do in proper order
	m_cellps.push_back(nodep);
    }
开发者ID:toddstrader,项目名称:verilator-integer-array,代码行数:4,代码来源:V3Param.cpp


注:本文中的CellList::push_back方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。