本文整理汇总了C++中Polygon2::Transform方法的典型用法代码示例。如果您正苦于以下问题:C++ Polygon2::Transform方法的具体用法?C++ Polygon2::Transform怎么用?C++ Polygon2::Transform使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Polygon2
的用法示例。
在下文中一共展示了Polygon2::Transform方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Update
void RenderTargetTestScreen::Update(float32 timeElapsed)
{
ftime += timeElapsed;
if (ftime > 5.0f)
{
UIHoleTransition *ft = new UIHoleTransition();
Polygon2 testPoly;
testPoly.AddPoint(Vector2(50, 85));
testPoly.AddPoint(Vector2(size.x - 50, 50));
testPoly.AddPoint(Vector2(size.x - 25, size.y - 85));
testPoly.AddPoint(Vector2(80, size.y - 50));
Matrix3 t, invT, r;
t.BuildTranslation(size/-2);
invT.BuildTranslation(size/2);
r.BuildRotation(DegToRad(10));
Matrix3 res = t * r * invT;
testPoly.Transform(res);
testPoly.Scale(size/2, 2.0f);
ft->SetDuration(10.f);
ft->SetPolygon(testPoly);
UIScreenManager::Instance()->SetScreen(SCREEN_STATIC_TEXT, ft);
SafeRelease(ft);
ftime = 0;
}
}
示例2: DrawPolygonTransformed
void RenderHelper::DrawPolygonTransformed(const Polygon2 & polygon, bool closed, const Matrix3 & transform)
{
Polygon2 copyPoly = polygon;
copyPoly.Transform(transform);
RenderHelper::Instance()->DrawPolygon(copyPoly, closed);
}