-
-
Notifications
You must be signed in to change notification settings - Fork 228
Features in progress
Dani Alias edited this page Jan 13, 2024
·
11 revisions
Here we compile info about the advancements and features in progress. Only for advanced users and contributors!
drawPie()
Having 4 different drawing modus
-
Filled Polygon
and backwards compatibility
Each 'drawPolygon()' backwards compatibility can be controlled separately with 'setIsConvex(true/false)':
Source snippet:
for (int iy = 0; iy < 5; iy++)
{
x = 0;
for (int ix = 0; ix < 13; ix++)
{
vertices[0] = Vec2(x + o + w, y + o - h);
vertices[1] = Vec2(x + o + w * 2, y + o);
vertices[2] = Vec2(x + o + w * 2 + h, y + o + w);
vertices[3] = Vec2(x + o + w * 2, y + o + w * 2);
if (AXRANDOM_0_1() > 0.5f)
{
drawNode1->setIsConvex(true);
color = Color4F::YELLOW;
}
else
{
drawNode1->setIsConvex(false); // default value!
color = Color4F::ORANGE;
}
drawNode1->drawPolygon(vertices, 4, Color4F(0.7f, 0.7f, 0.7f, 0.5f), 1, color);
x += 70;
}
y += 80;
}
-
Filled Polygon
- No checks on drawPolygon()
- drawPolygon() using Poly2Tri for triangulation and has the same restrictions.
- No checks on drawPolygon()
-
Filled Polygon
/Poly2Tri restrictions:Since there are no Input validation of the data given for triangulation you need to think about this:
- Poly2Tri does not support repeat points within epsilon.
- If you have a cyclic function that generates random points make sure you don't add the same coordinate twice.
- If you are given input and aren't sure same point exist twice you need to check for this yourself.
=> The new DrawNode v2 and more!
- DrawNodeEx is not only a class for drawing primitives, it's more:
- It's a kind of sprite created from drawing primitives!
At the moment all infos be there: #1579
All info there: Rendering artifacts #1552
Maybe somebody want write it better as only a link?