-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Quake MDL feature #1591
base: master
Are you sure you want to change the base?
Quake MDL feature #1591
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1591 +/- ##
==========================================
+ Coverage 95.69% 95.76% +0.06%
==========================================
Files 125 127 +2
Lines 9926 10190 +264
==========================================
+ Hits 9499 9758 +259
- Misses 427 432 +5 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @Youva !!
There is still some clean-up to do, especially memory leaks to fix, but they will appear in the CI when you will add a test.
90% of the job is done, and there's the annoying, yet important, finalization left :)
@Youva any news on this ? |
1 similar comment
@Youva any news on this ? |
Hi @Youva ! Looks like you are back. First you may want to rebase on the latest master :) |
You are modifying libf3d public API! |
Looks like your merge did not go as expected. I'd strongly suggest using rebase instead of merge. Let me know if I can help (on discord or here). |
70ec237
to
988186a
Compare
Hi @Youva Please resolve discussions you have adressed and let us know if this is ready for review. |
Also changed test .png for quake mdl.
2f4b791
to
60c64d9
Compare
Hi @Youva , please let us know if this is ready for review :) |
int TestF3DQuakeMDLImporter(int vtkNotUsed(argc), char* argv[]) | ||
{ | ||
std::string filename = | ||
std::string(argv[1]) + "data/glaunch_2.mdl"; // File was modified to add coverage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what did you modify ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I modified it with a hex editor for coverage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok but to reach which part of the importer code ? :)
@@ -27,6 +27,7 @@ | |||
- duck.fbx: assimp test models: BSD-3-Clause | |||
- Duck0.bin: Copyright 2006 Sony Computer Entertainment Inc.: SCEA Shared Source License | |||
- duck_invalid.gltf: Copyright 2006 Sony Computer Entertainment Inc.: SCEA Shared Source License | |||
- glaunch*.mdl : Preach: CC-BY-NC 4.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No feedback from Preach yet Im afraid, ill ask again
@@ -150,6 +150,7 @@ f3d_test(NAME TestVTM DATA mb.vtm UI) | |||
f3d_test(NAME TestVTK DATA cow.vtk) | |||
f3d_test(NAME TestNRRD DATA beach.nrrd ARGS -s) | |||
f3d_test(NAME TestSPLAT DATA small.splat ARGS -osy --up=-Y --point-sprites-size=1) | |||
f3d_test(NAME TestQuakeMDL DATA glaunch.mdl ARGS --animation-index=1 --animation-autoplay=true --animation-time=0.1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also need to add DefaultConfig and ThumbnailConfig tests (see other tests named like this)
vtkIdType selectedAnimationIndex = 1; | ||
importer->EnableAnimation(selectedAnimationIndex); | ||
std::string animationName = importer->GetAnimationName(2); | ||
return numAnimations == 2 && animationName == "" ? EXIT_SUCCESS : EXIT_FAILURE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it expected that the animation has an empty name ?
std::pair<int, float> pair = std::make_pair(this->AnimationIds[i].first, | ||
(this->AnimationIds[i].second + this->AnimationIds[i + 1].second) / 2); | ||
// Increments i to avoid infinite loop | ||
this->AnimationIds.insert(this->AnimationIds.begin() + i++, pair); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add more comments on that logic ? its not super clear to me
/** | ||
* Update actors at the given time value. | ||
*/ | ||
void UpdateTimeStep(double timeValue) override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think this method is needed ?
* Get the number of available cameras. | ||
* Not implemented, multiple cameras are not specified. | ||
*/ | ||
vtkIdType GetNumberOfCameras() override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YOu can remove this method
Adds class vtkQuakeMDLImporter that reads .MDL files.
The class :