Remove some unused variables, less verbose animation logic #1100
+118
−62
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 adds a
Random
utility class that provides more functionality than the existingrnd()
function used in the multithreaded example.It does some minor cleanup on the animation logic.
glm::vec3 rotation
replaced byfloat rotationAxis;
because the X and Z values are never read or written.glm::mat4 model
removed as it's only used as an intermediate value to write to the push constant structureObjectData
, update it per-frame and extract the mat4 are moved into the structure itself, reducing the verbosity and amount of indirection required to access all the variablesx = a + rnd(b)
I've updated it to berandom.real(a, a+b)
which provides the same range of values but feels easier to read