-
-
Notifications
You must be signed in to change notification settings - Fork 312
Quake MDL feature #1591
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
Merged
Merged
Quake MDL feature #1591
Changes from all commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
125e920
Adding preliminary Quake1 MDL plugin.
malespiaut 0110524
Fixing some vector types error in vtkQuakeMDLReader.
malespiaut 4dc2ca1
Fixing some formatting error (whitespaces) in vtkQuakeMDLReader.
malespiaut aa5a84a
Fixing typo in vtkQuakeMDLReader.
malespiaut 6c40623
Cleaning out unnecessary code.
malespiaut 4fb427f
Add importer
Youva 333a50e
Removed hardcoded path
Youva 34203f8
Fixed crash due to memory allocation on normals and interpolated fram…
Youva aa48d46
Formatting
Youva 354f2ed
Formatting
Youva 1d17341
Formatting
Youva 4f6fdc5
Fixed build errors w/ strict_build
Youva 8e43a28
Update vtkQuakeMDLImporter.cxx
Youva 9ea44a4
Update vtkQuakeMDLImporter.cxx
Youva d2de07c
Fixed override updateTimeStep.
Youva 345e76d
Removed some warnings
Youva e3c97ff
Applied style.
Youva c82166d
Changed push_back to emplace_back
Youva b0d089f
Return bool l. 432
Youva ccdc735
Fix unusedStructMember and containerOutOfBounds
Youva a528ce7
Coding style modification.
Youva fee56b5
Added unit test
Youva a7dc5c7
Changed UpdateTimeStep
Youva f1d046b
Adding preliminary Quake1 MDL plugin.
malespiaut b84e316
Fixing some vector types error in vtkQuakeMDLReader.
malespiaut 891c890
Fixing some formatting error (whitespaces) in vtkQuakeMDLReader.
malespiaut f5dd8fa
Fixing typo in vtkQuakeMDLReader.
malespiaut 48f100f
Cleaning out unnecessary code.
malespiaut c3f61ae
Add importer
Youva 965dbc7
Removed hardcoded path
Youva a877a23
Fixed crash due to memory allocation on normals and interpolated fram…
Youva c41df2c
Formatting
Youva c4cb73f
Formatting
Youva 3da6434
Formatting
Youva b436281
Fixed build errors w/ strict_build
Youva a6e9fae
Update vtkQuakeMDLImporter.cxx
Youva b7cf43b
Update vtkQuakeMDLImporter.cxx
Youva f316c80
Fixed override updateTimeStep.
Youva eb77ea6
Removed some warnings
Youva 8f631d9
Applied style.
Youva ee3e50b
Changed push_back to emplace_back
Youva 1d4dbb5
Return bool l. 432
Youva 9f4fca3
Fix unusedStructMember and containerOutOfBounds
Youva 38f1ca9
Coding style modification.
Youva 90ba6e0
Added unit test
Youva f8cf6ad
Compiler warning and indentation
Youva b0fb19d
Formatting
Youva 7494741
Added coverage to f3dquakemdlimporter
Youva 1c1f684
Coverage, added comments
Youva 756fe76
Added asset file for coverage
Youva 22da0e3
Changed pointer cast, formatting.
Youva 0b4b0d2
Added constexpr variables for offset calculation
Youva cd35e76
Test coverage for animations
Youva 2a97308
Coverage for animations.
Youva 0733091
Added coverage
Youva 4cc5547
Update TestQuakeMDL.png
Youva 6202460
Changed animation time
Youva bbf659d
Added UpdateAtTimeValue
Youva 6eb0c15
Formatting
Youva 8b0aebb
Changed some functions in quakemdlimporter
Youva b9ed2ba
Formatting
Youva d5b3f26
Changed asset file for .mdl
Youva 41044e9
Changed baseline for thumbnail test
Youva 8de2266
Changed TestDefaultConfigFileQuakeMDL and TestThumbnailConfigFileQuak…
Youva e63c8b4
Formatting
Youva 01f4492
Formatting
Youva b5c7d3a
Formatting
Youva 14613da
Changed updatetimestep in vtkf3dquakemdlimporter
Youva c501d96
Update plugins/native/module/Testing/TestF3DQuakeMDLImporter.cxx
Youva File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Youva marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,5 +61,12 @@ | |
"anti-aliasing": false, | ||
"translucency-support": false | ||
} | ||
}, | ||
{ | ||
"match": ".*(mdl)", | ||
"options": { | ||
"up": "+Z", | ||
"animation-index": "-1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So most animated models have multiples animations baked in and all animations should be enabled by default ? |
||
} | ||
} | ||
] |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,5 +44,11 @@ | |
"anti-aliasing": false, | ||
"translucency-support": false | ||
} | ||
}, | ||
{ | ||
"match": ".*(mdl)", | ||
"options": { | ||
"up": "+Z" | ||
} | ||
} | ||
] |
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
set(classes | ||
vtkF3DSplatReader | ||
vtkF3DQuakeMDLImporter | ||
) | ||
|
||
set(_no_install "") | ||
|
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
set(vtkextNative_list | ||
TestF3DQuakeMDLImporter.cxx | ||
) | ||
|
||
vtk_add_test_cxx(vtkextNativeTests tests | ||
NO_DATA NO_VALID NO_OUTPUT | ||
${vtkextNative_list} | ||
${F3D_SOURCE_DIR}/testing/ ${CMAKE_BINARY_DIR}/Testing/Temporary/) | ||
|
||
vtk_test_cxx_executable(vtkextNativeTests tests) |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "vtkF3DQuakeMDLImporter.h" | ||
|
||
#include <vtkDoubleArray.h> | ||
Youva marked this conversation as resolved.
Show resolved
Hide resolved
|
||
#include <vtkNew.h> | ||
#include <vtkTestUtilities.h> | ||
|
||
#include <iostream> | ||
|
||
int TestF3DQuakeMDLImporter(int vtkNotUsed(argc), char* argv[]) | ||
{ | ||
std::string filename = | ||
std::string(argv[1]) + "data/zombie_2.mdl"; // MDL can load two types of frames and two types of | ||
// textures, another file was added for coverage. | ||
vtkNew<vtkF3DQuakeMDLImporter> importer; | ||
importer->SetFileName(filename); | ||
importer->Update(); | ||
importer->Print(cout); | ||
vtkIdType numAnimations = importer->GetNumberOfAnimations(); | ||
for (int i = 0; i < numAnimations; i++) | ||
{ | ||
importer->DisableAnimation(i); | ||
} | ||
vtkIdType selectedAnimationIndex = 0; | ||
importer->EnableAnimation(selectedAnimationIndex); | ||
std::string animationName = importer->GetAnimationName(0); | ||
return numAnimations == 1 && animationName == "frame" ? EXIT_SUCCESS : EXIT_FAILURE; | ||
} |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.