Revert "Tweak mixer appearance (octagon -> circle)"
This reverts commit 01dfaee33f.
This commit is contained in:
parent
decf3ba5be
commit
e1bd2b7359
1 changed files with 42 additions and 5 deletions
|
|
@ -903,20 +903,57 @@ namespace gmtk
|
|||
float r1 = std::sqrt(2.f) * (2.f + 2.f * an) / 16.f * box[0].length();
|
||||
float r2 = std::sqrt(2.f) * (4.f + 2.f * an) / 16.f * box[0].length();
|
||||
|
||||
float s = bbox[0].length() * 0.025f;
|
||||
float t = 0.6f * s;
|
||||
|
||||
box = geom::expand(box, an * box[0].length() * 0.125f);
|
||||
|
||||
float s = bbox[0].length() * 0.025f;
|
||||
geom::point<float, 2> points[]
|
||||
{
|
||||
box.corner(0.f, 0.75f),
|
||||
box.corner(0.f, 0.25f),
|
||||
box.corner(0.25f, 0.f),
|
||||
box.corner(0.75f, 0.f),
|
||||
box.corner(1.f, 0.25f),
|
||||
box.corner(1.f, 0.75f),
|
||||
box.corner(0.75f, 1.f),
|
||||
box.corner(0.25f, 1.f),
|
||||
};
|
||||
|
||||
static geom::triangle<std::uint32_t> const triangles[]
|
||||
{
|
||||
{0, 1, 2},
|
||||
{0, 2, 3},
|
||||
{0, 3, 4},
|
||||
{0, 4, 5},
|
||||
{0, 5, 6},
|
||||
{0, 6, 7},
|
||||
};
|
||||
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
auto color = (i == 0) ? gfx::black : gfx::white;
|
||||
|
||||
float r = box[0].length() / 2.f;
|
||||
|
||||
if (i == 1)
|
||||
r -= s;
|
||||
{
|
||||
points[0] += geom::vector{ s, -t};
|
||||
points[1] += geom::vector{ s, t};
|
||||
points[2] += geom::vector{ t, s};
|
||||
points[3] += geom::vector{-t, s};
|
||||
points[4] += geom::vector{-s, t};
|
||||
points[5] += geom::vector{-s, -t};
|
||||
points[6] += geom::vector{-t, -s};
|
||||
points[7] += geom::vector{ t, -s};
|
||||
}
|
||||
|
||||
painter.circle(box.center(), r, color, 72);
|
||||
for (auto const & t : triangles)
|
||||
{
|
||||
auto p0 = points[t[0]];
|
||||
auto p1 = points[t[1]];
|
||||
auto p2 = points[t[2]];
|
||||
|
||||
painter.triangle(p0, p1, p2, color);
|
||||
}
|
||||
}
|
||||
|
||||
auto c = bbox.center();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue