本文整理汇总了C++中Patch::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ Patch::GetName方法的具体用法?C++ Patch::GetName怎么用?C++ Patch::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Patch
的用法示例。
在下文中一共展示了Patch::GetName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: on_nodeinstanciation
void Face::on_nodeinstanciation( BaseQuadtreeNode* p_node )
{
if( NULL == m_rootpatch )
{
QuadtreeNode<Patch>* root = static_cast<QuadtreeNode<Patch>*>( p_node );
Patch* patch = _DRAWSPACE_NEW_( Patch, Patch( m_planet_diameter / 2.0, m_orientation, ".0", NULL, -1, root ) );
root->SetContent( patch );
dsstring patch_name;
patch->GetName( patch_name );
m_patches[patch_name] = p_node;
for( size_t i = 0; i < m_inst_handlers.size(); i++ )
{
(*( m_inst_handlers[i] ) )( m_orientation, patch );
}
}
else
{
QuadtreeNode<Patch>* node = static_cast<QuadtreeNode<Patch>*>( p_node );
QuadtreeNode<Patch>* parent = static_cast<QuadtreeNode<Patch>*>( node->GetParent() );
dsstring parent_name;
parent->GetContent()->GetName( parent_name );
dsstring node_name = parent_name + dsstring( "." );
char dstbuf[32];
node_name += dsstring( itoa( node->GetId(), dstbuf, 10 ) );
Patch* patch = _DRAWSPACE_NEW_( Patch, Patch( m_planet_diameter / 2.0, m_orientation, node_name, parent->GetContent(), node->GetId(), node ) );
node->SetContent( patch );
dsstring patch_name;
patch->GetName( patch_name );
m_patches[patch_name] = p_node;
for( size_t i = 0; i < m_inst_handlers.size(); i++ )
{
(*( m_inst_handlers[i] ) )( m_orientation, patch );
}
}
}
示例2: on_nodedeletion
void Face::on_nodedeletion( DrawSpace::Utils::BaseQuadtreeNode* p_node )
{
QuadtreeNode<Patch>* node = static_cast<QuadtreeNode<Patch>*>( p_node );
Patch* patch = node->GetContent();
for( size_t i = 0; i < m_del_handlers.size(); i++ )
{
(*( m_del_handlers[i] ) )( m_orientation, patch );
}
dsstring patch_name;
patch->GetName( patch_name );
m_patches.erase( patch_name );
_DRAWSPACE_DELETE_( patch );
}