-
Notifications
You must be signed in to change notification settings - Fork 417
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
nicovanduijn
wants to merge
24
commits into
flexible-collision-library:master
Choose a base branch
from
nicovanduijn:WIP-unit-test-primitives
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
WIP unit test for generateBVHModel from primitives #311
nicovanduijn
wants to merge
24
commits into
flexible-collision-library:master
from
nicovanduijn:WIP-unit-test-primitives
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This serves as the bare bones for a future more elaborate unit test to ensure proper functionality of the
generateBVHModel
functions.This change is