コード例 #1
0
ファイル: vertexformat.cpp プロジェクト: x6herbius/calliper
 int VertexFormat::totalVertexComponents() const
 {
     return positionComponents()
             + normalComponents()
             + colorComponents()
             + textureCoordinateComponents();
 }
コード例 #2
0
void StronglyConnectedComponentsVisitor::computeComponents(Graph & graph, bool color)
{
    // reset _SCC
    _SCC.clear();

    vector<Node*> nodes = graph.getNodes();
    int size = nodes.size();

    initTables(size);

    for ( int i = 0; i < size; ++i )
    {
        // if nodes[i] has no index
        if ( _indexTable[i] == -1 )
            strongconnect( &graph, nodes[i], i );
    }

    if ( color )
    // color the different strongly connected components to distinguish them
        colorComponents();
}