本文整理汇总了C++中CGrid::GetAlphaIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ CGrid::GetAlphaIndex方法的具体用法?C++ CGrid::GetAlphaIndex怎么用?C++ CGrid::GetAlphaIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGrid
的用法示例。
在下文中一共展示了CGrid::GetAlphaIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnLButtonDown
void CEasyGenView::OnLButtonDown(UINT nFlags, CPoint point)
{
CEasyGenDoc *pDoc = GetDocument();
S_POSINFO inf;
CTris *t;
CNmVec3 p;
int tab;
m_LDP = point;
BOOL kCTRL = nFlags & MK_CONTROL;
BOOL kSHIFT = nFlags & MK_SHIFT;
BOOL Refresh = FALSE;
int mod = pDoc->GetModifier();
switch (tab = pDoc->GetActiveTab())
{
case (TAB_GRID):
break;
case (TAB_MODIFIER):
// Get a vertex to drag(CTRL+SHIFT+LeftBut)
if (kCTRL && kSHIFT)
{
if (GetXYZ(point, p))
{
if (g_Grid.GetInfo(p.x, p.y, &inf))
{
m_VertexGot = g_Grid.GetK(inf.i, inf.j);
}
}
}
// Exclude triangle from export | to prevent erroneus exclusion
if (!kCTRL && kSHIFT && g_Grid.OptionExcludedTrisGet())
{
if (GetXYZ(point, p))
{
t = g_Grid.GetTris(g_Grid.GetTris(p.x, p.y));
if (t)
{
t->SetExcluded(!t->GetExcluded());
pDoc->m_bInvalidateGridColor = TRUE;
Refresh = TRUE;
}
}
}
break;
case (TAB_ALPHAMAP):
int curindex;
curindex = g_AlphamapMan.GetCurSel();
// paint the alphamap (CTRL+SHIFT+LeftBut)
if (kCTRL && kSHIFT && curindex != -1)
{
if (GetXYZ(point, p))
{
if (g_Grid.GetInfo(p.x, p.y, &inf))
{
m_VertexGot = g_Grid.GetK(inf.i, inf.j);
// g_Grid.SetAlphaIndex(m_VertexGot, curindex );
g_Grid.PaintAlphaIndex(inf.i, inf.j, pDoc->m_dwPaintRadius, curindex);
Refresh = TRUE;
}
}
}
int indexgot;
// copy alphamap index (SHIFT+LeftBut)
if (!kCTRL && kSHIFT)
{
if (GetXYZ(point, p))
{
if (g_Grid.GetInfo(p.x, p.y, &inf))
{
m_VertexGot = g_Grid.GetK(inf.i, inf.j);
indexgot = g_Grid.GetAlphaIndex(m_VertexGot);
if (indexgot != g_AlphamapMan.GetCurSel())
{
g_AlphamapMan.SetCurSel(indexgot);
pDoc->UpdateFormView(TAB_ALPHAMAP);
}
}
}
}
break;
case (TAB_MODELS):
// MD3 - Selecting
if (!kCTRL && kSHIFT)
{
CNmVec3 ray, dummy;
float md3_dist, hitterra_dist;
//.........这里部分代码省略.........