本文整理汇总了C++中MFMatrix::SetScale方法的典型用法代码示例。如果您正苦于以下问题:C++ MFMatrix::SetScale方法的具体用法?C++ MFMatrix::SetScale怎么用?C++ MFMatrix::SetScale使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MFMatrix
的用法示例。
在下文中一共展示了MFMatrix::SetScale方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Multiply
MFMatrix& MFMatrix::Scale(const MFVector& scale)
{
MFMatrix mat;
mat.SetScale(scale);
return Multiply(mat);
}
示例2: Draw
//.........这里部分代码省略.........
MFPrimitive(PT_TriStrip, 0);
// TODO: we could consider not drawing this part of the hold line.. seems reasonable that it terminates at the line...
if(gEditor.state == GHPS_Stopped)
{
if(position < 0.0f)
{
MFBegin(4);
MFSetColourV(gColours[key]);
MFSetPosition(xoffset - 0.2f, 0.0f, MFMin(whammyTop, 0.0f));
MFSetPosition(xoffset + 0.2f, 0.0f, MFMin(whammyTop, 0.0f));
MFSetPosition(xoffset - 0.2f, 0.0f, position);
MFSetPosition(xoffset + 0.2f, 0.0f, position);
MFEnd();
}
}
if(whammyTop > 0.0f)
{
// this half could have waves cruising down it if we wanted to support the whammy...
MFBegin(4);
MFSetColourV(gColours[key]);
MFSetPosition(xoffset - 0.2f, 0.0f, MFMin(whammyTop, (float)end));
MFSetPosition(xoffset + 0.2f, 0.0f, MFMin(whammyTop, (float)end));
MFSetPosition(xoffset - 0.2f, 0.0f, MFMax(position, 0.0f));
MFSetPosition(xoffset + 0.2f, 0.0f, MFMax(position, 0.0f));
MFEnd();
}
}
if(evTime >= bottomTime)
{
MFMatrix mat;
mat.SetScale(MakeVector(0.5f/20, 0.5f/20, 0.5f/20));
mat.Translate(MakeVector(xoffset, 0.03f, position));
MFModel_SetWorldMatrix(pButton, mat);
MFStateBlock *pSB = MFStateBlock_CreateTemporary(64);
MFStateBlock_SetVector(pSB, MFSCV_DiffuseColour, pEv->played == -1 ? MakeVector(0.3f, 0.3f, 0.3f, 1.0f) : MFVector::white);
// MFStateBlock_SetVector(pSB, MFSCV_DiffuseColour, position < 0.0f ? MakeVector(0.3f, 0.3f, 0.3f, 1.0f) : MFVector::white);
// MFRenderer_SetRenderStateOverride(MFRS_MaterialOverride, (uint32&)(tap ? pButtonMat[key] : pButtonRing[key]));
MFRenderer_AddModel(pButton, pSB, MFView_GetViewState());
// render the note time
if(bRenderNoteTimes)
{
MFView_Push();
MFView_SetOrtho(&rect);
MFVector pos;
MFView_TransformPoint3DTo2D(MakeVector(xoffset, 0.0f, position), &pos);
pos.x += 16.0f;
pos.y -= 26.0f;
int minutes = (int)(pEv->time / 60000000);
int seconds = (int)((pEv->time % 60000000) / 1000000);
int milliseconds = (int)((pEv->time % 1000000) / 1000);
MFFont_DrawTextf(pText, pos, 20.0f, MFVector::yellow, "%s: %d:%02d.%d\nTick: %g", MFTranslation_GetString(pStrings, TRACK_TIME), minutes, seconds, milliseconds, (float)pEv->tick/res);
MFView_Pop();
}
}
}
if(pEv->event == GHE_Special)