本文整理汇总了C++中COperator::GetProcessParams方法的典型用法代码示例。如果您正苦于以下问题:C++ COperator::GetProcessParams方法的具体用法?C++ COperator::GetProcessParams怎么用?C++ COperator::GetProcessParams使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COperator
的用法示例。
在下文中一共展示了COperator::GetProcessParams方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Execute
void CCmdSetVertexAlpha::Execute()
{
CCmd::Execute();
COperator * pOperator = CXFile::GetInstance()->GetOperator();
CTerrainMesh * pTerrainMesh = CXFile::GetInstance()->GetTerrainMesh();
// for the first time
if ( 0 == m_processParams.dwBrushSize )
{
memcpy(&m_processParams,pOperator->GetProcessParams(),sizeof(COperator::SProcessParams));
m_processParams.pObjectHot.grab();
}
CTerrainMesh::SGrid & grid = pTerrainMesh->GetGrid(m_processParams.dwGridIndexHot);
int nVertexIndexHot = grid.dwVertexIndex[0];
for ( std::vector<SVertex>::iterator iter = m_vecDiffs.begin(); iter != m_vecDiffs.end(); ++iter )
{
if ( m_processParams.eSetWayType == COperator::ESWT_CUT )
{
pTerrainMesh->CutVertexAlpha(iter->dwVertexIndex);
continue;
}
switch ( m_processParams.eSetAxisType )
{
case COperator::EAT_X:
{
switch ( m_processParams.eSetAlphaType )
{
case COperator::ESAT_LINEAR:
{
switch ( m_processParams.eSetWayType )
{
case COperator::ESWT_INC:
{
pTerrainMesh->IncLinearVertexAlphaX(iter->dwVertexIndex);
}
break;
case COperator::ESWT_DEC:
{
pTerrainMesh->DecLinearVertexAlphaX(iter->dwVertexIndex);
}
break;
}
}
break;
}
}
break;
case COperator::EAT_Z:
{
switch ( m_processParams.eSetAlphaType )
{
case COperator::ESAT_LINEAR:
{
switch ( m_processParams.eSetWayType )
{
case COperator::ESWT_INC:
{
pTerrainMesh->IncLinearVertexAlphaZ(iter->dwVertexIndex);
}
break;
case COperator::ESWT_DEC:
{
pTerrainMesh->DecLinearVertexAlphaZ(iter->dwVertexIndex);
}
break;
}
}
break;
}
}
break;
case COperator::EAT_BOTH:
{
switch ( m_processParams.eSetAlphaType )
{
case COperator::ESAT_LINEAR:
{
switch ( m_processParams.eSetWayType )
{
case COperator::ESWT_INC:
{
pTerrainMesh->IncLinearVertexAlphaB(iter->dwVertexIndex, nVertexIndexHot);
}
break;
case COperator::ESWT_DEC:
{
pTerrainMesh->DecLinearVertexAlphaB(iter->dwVertexIndex);
}
break;
//.........这里部分代码省略.........