-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: Decompose transformation matrices while parsing
This adds a option enum that makes fastgltf decompose node matrices into the TRS components for ease of use further on.
- Loading branch information
Showing
9 changed files
with
250 additions
and
60 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,5 +72,5 @@ else() | |
endif() | ||
|
||
add_subdirectory(src) | ||
add_subdirectory(tests) | ||
add_subdirectory(examples) | ||
add_subdirectory(tests) |
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"asset": { | ||
"version": "2.0" | ||
} | ||
"asset": { | ||
"version": "2.0" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"asset": { | ||
"version": "2.0" | ||
}, | ||
"cameras": [ | ||
{ | ||
"perspective": { | ||
"yfov": 1.0, | ||
"zfar": 1.0, | ||
"znear": 0.001 | ||
}, | ||
"type": "perspective" | ||
} | ||
], | ||
"nodes": [ | ||
{ | ||
"name": "TRS components", | ||
"camera": 0, | ||
"translation": [ | ||
1.0, 1.0, 1.0 | ||
], | ||
"rotation": [ | ||
0.0, 1.0, 0.0, 0.0 | ||
], | ||
"scale": [ | ||
2.0, 0.5, 1.0 | ||
] | ||
}, | ||
{ | ||
"name": "Matrix", | ||
"camera": 0, | ||
"matrix": [ | ||
-2.0, 0.0, 0.0, 0.0, | ||
0.0, 0.5, 0.0, 0.0, | ||
0.0, 0.0, -1.0, 0.0, | ||
1.0, 1.0, 1.0, 1.0 | ||
] | ||
} | ||
] | ||
} |