本文整理汇总了C++中Bone::getAttachedVerticesCount方法的典型用法代码示例。如果您正苦于以下问题:C++ Bone::getAttachedVerticesCount方法的具体用法?C++ Bone::getAttachedVerticesCount怎么用?C++ Bone::getAttachedVerticesCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bone
的用法示例。
在下文中一共展示了Bone::getAttachedVerticesCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: selectVerticesInRange
/**
* Select vertices in bone range
* if there are no attached vertices use circle selection
* otherwise select attached vertices
* \param mesh pointer to mesh
**/
void Skeleton::selectVerticesInRange(Mesh *mesh)
{
mesh->clearSelection();
for (unsigned i = 0; i < bones->size(); i++) {
Bone *b = (*bones)[i];
/* select vertices in selection circle only if there are no vertices
* attached */
if (b->selected) {
if (b->getAttachedVerticesCount() == 0) {
/* selection happens in screen coordinate system, just like the
* drawSelectionBox in animata.cpp */
// so get the view radius as in Bone.draw()
Vector2D v = b->getViewCenter();
// float r = b->getRadius();
float r = b->getViewRadius();
selector->doCircleSelect(mesh, Selection::SELECT_VERTEX, v,
(int)r);
}
else {
b->selectAttachedVertices();
}
}
}
}