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

WIP unit test for generateBVHModel from primitives #311

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

nicovanduijn
Copy link
Contributor

@nicovanduijn nicovanduijn commented Jul 11, 2018

This serves as the bare bones for a future more elaborate unit test to ensure proper functionality of the generateBVHModel functions.


This change is Reviewable

Nico van Duijn added 24 commits July 5, 2018 10:00
Identical to the GenerateBVHModel, but without ending the model, such that
more geometric primitives can be added. This is useful if you want to
create a BVHModel containing multiple geometric primitives.
This commit refactors the generateBVHModel() functions to use
an additional boolean argument to chose whether the geometric
primitive should be added to an existing model. This seems
a bit cleaner than the previously added "generateBVHSubModel"
variants.
In response to Michael Sherman's comments. Should be more clear now
This is needed to avoid implicit casts from unsigned int that
would render the overload resolution impossible.
In generateBVHModel for a cylinder and cone, total actually represents
the total number of triangles of the bottom or top plate, not
the total triangles of the entire primitive (as opposed to the other
generateBVHModel variants)
So we can pull out a loop invariant
Includes response to PR review, with minor comment fixes
as well as a major refactor in the unit test function.
WIP

This reverts commit 3a480ac.
Essentially adding the bare bones for a unit test that ensures
proper BVHModel generation from geometric primitives. So far
this test only checks the number of vertices and triangles, which
is insufficient to assert proper functionality of the
generateBVHModel() functions.
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.

1 participant