Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CreatePolygonTool upgrade #161

Merged
merged 1 commit into from
Mar 13, 2020
Merged

Conversation

peteihis
Copy link
Contributor

Upgraded to work with the same logic as the primitives and Spline Mesh. Resolves #156.

  • Draws the unsmoothed shape during drag for reference as overlay.

Let me know if you find anything funny, the modifications were prettey heavy.

sine[i] = Math.sin((i+0.5)*2.0*Math.PI/sides);
sine[i] = 1e-10*Math.round(sine[i]*1e10);
sine[i] = Math.sin((i+0.5)*2.0*Math.PI/sides);
sine[i] = 1e-10*(Math.round(sine[i]*1e10));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only thing I've done so far: you've got a redundant pair of parentheses here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 83

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. I tried somethig different here, this happened at returning the original.

vertex[i].x = sine[i]*xscale;
vertex[i].y = -cosine[i]*yscale;
}
((Mesh)(objInfo.object)).setVertexPositions(vertex);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And another here. objectInfo.object does not need to be wrapped.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@Sailsman63
Copy link
Member

I've come down on the side of consistency. I think we'll be better off with this than without.

@peteihis
Copy link
Contributor Author

Fixed.

@Sailsman63 Sailsman63 merged commit 5a752be into ArtOfIllusion:master Mar 13, 2020
@peteihis peteihis deleted the create_polygon branch March 13, 2020 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Match polygon drawing tool modifier keys with primitives and spline mesh
2 participants