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

Export transparency correctly in VRML #456

Merged
merged 2 commits into from Aug 9, 2019
Merged

Export transparency correctly in VRML #456

merged 2 commits into from Aug 9, 2019

Conversation

nabijaczleweli
Copy link
Contributor

Opted for an explicit span container for clarity but that can be easily replaced with explicit iterator-fors if you're not a fan

screenshot

@nabijaczleweli nabijaczleweli changed the title Write out VRML exports grouped by their opacity Export transparency correctly in VRML Aug 9, 2019
src/export.cpp Outdated
struct STriangleSpan {
const STriangle *first, *past_last;

const STriangle *begin() const { return first; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: this should be properly called cbegin since it returns a const iterator, but it's probably better to ditch const here since it doesn't really do anything useful. (const in SolveSpace is only used for replacing by-value passing with by-const-reference.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just copied the List<> API here tbh
Also, FWIW, begin() has both const and non-const overloads in the STL, and ranged-for uses only begin()

Anyway, ditched

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, you're right, my bad.

@whitequark whitequark merged commit d9081b0 into solvespace:master Aug 9, 2019
@whitequark
Copy link
Contributor

Thanks!

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.

None yet

2 participants