本文整理汇总了C++中CGroupMap::setSelectionAxis方法的典型用法代码示例。如果您正苦于以下问题:C++ CGroupMap::setSelectionAxis方法的具体用法?C++ CGroupMap::setSelectionAxis怎么用?C++ CGroupMap::setSelectionAxis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGroupMap
的用法示例。
在下文中一共展示了CGroupMap::setSelectionAxis方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateBeforeRender
//***************************************************************
void CToolCreateEntity::updateBeforeRender()
{
//H_AUTO(R2_CToolCreateEntity_updateBeforeRender)
if (_CreateState != DrawArray)
{
CToolChoosePos::updateBeforeRender();
_AutoGroup.update(_CreatePosition, _PaletteId, _Valid && !isCtrlDown());
setContextHelp(CI18N::get(_AutoGroup.getGroupingCandidate() ? "uiR2EDToolCreateEntityAutoGroup" : "uiR2EDToolCreateEntity"));
return;
}
setContextHelp(CI18N::get("uiR2EDDrawArrayContextHelp"));
// update for array mode
bool valid = true;
sint32 mouseX, mouseY;
getMousePos(mouseX, mouseY);
if (!isInScreen(mouseX, mouseY) || (isMouseOnUI() && !isMouseOnWorldMap()))
{
valid = false;
_ArrayEnd = _ArrayOrigin;
}
//
CTool::CWorldViewRay worldViewRay;
computeWorldViewRay(mouseX, mouseY, worldViewRay);
//
CVector entityPos; // the pos where the ghost will be shown
CVector inter; // intersection of view ray with landscape
_ValidArray = true;
TRayIntersectionType rayIntersectionType = computeLandscapeRayIntersection(worldViewRay, inter);
switch(rayIntersectionType)
{
case NoIntersection:
_ValidArray = false;
_ArrayEnd = _ArrayOrigin;
break;
case ValidPacsPos:
case InvalidPacsPos:
_ArrayEnd = inter;
break;
}
for (uint k = 0; valid && k < _ArrayElements.size(); ++k)
{
if (_ArrayElements[k])
{
if (_ArrayElements[k]->getDisplayFlag(CDisplayerVisual::FlagBadPos))
{
_ValidArray = false;
}
}
}
CGroupMap *worldMap = getWorldMap();
if (worldMap) worldMap->setSelectionAxis(_ValidArray);
setMouseCursor(_ValidArray ? _CursValid.c_str() : _CursInvalid.c_str());
}