本文整理汇总了C++中GraphNode::get_category方法的典型用法代码示例。如果您正苦于以下问题:C++ GraphNode::get_category方法的具体用法?C++ GraphNode::get_category怎么用?C++ GraphNode::get_category使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GraphNode
的用法示例。
在下文中一共展示了GraphNode::get_category方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resetGraph
void PlygonDrawer::resetGraph() {
GraphNodeVisitorGraph grp_vis;
for (grp_vis.begin(m_graph->m_rows, m_graph->m_cols); ! grp_vis.end(); ++grp_vis)
if (m_graph->check_bdy_enable(grp_vis.m_ptCur)) {
GraphNode* pNode = m_graph->get_node(grp_vis.m_ptCur);
auto categ = pNode->get_category();
categ.spec = CHESS_CATEGORY_NORM;
categ.color = (enNodeColor)(rand()%NODE_COLOR_SPEC);
m_tileMap->changeCell(grp_vis.m_ptCur, &categ);
pNode->set_category(categ);
}
}
示例2: clrGraph
void PlygonDrawer::clrGraph() {
GraphNodeVisitorGraph grp_vis;
for (grp_vis.begin(m_graph->m_rows, m_graph->m_cols); ! grp_vis.end(); ++grp_vis)
if (m_graph->check_bdy_enable(grp_vis.m_ptCur)) {
GraphNode* pNode = m_graph->get_node(grp_vis.m_ptCur);
auto categ = pNode->get_category();
if(categ.spec != enBeadCategory::CHESS_CATEGORY_NORM && categ.spec != enBeadCategory::CHESS_CATEGORY_DOUBLE) {
auto categ_new = categ;
categ_new.spec = enBeadCategory::CHESS_CATEGORY_NORM;
if (categ_new.color == enNodeColor::NODE_COLOR_SPEC) {
categ_new.color = (enNodeColor)(rand()%enNodeColor::NODE_COLOR_SPEC);
}
pNode->set_category(categ_new);
m_tileMap->changeCell(grp_vis.m_ptCur, &categ_new);
}
}
}