Comments (2)
One possible way to do this is changing the renderloop::renderRecordsForSystem()
function in src/code/engine/RenderLoop.cpp
at around L14. This is the function that is called by the visualization bash command. The render loop at around line 56 is the control logic for rendering the frames from the loaded folder.
L80 currentFrame = std::min(currentFrame+1, N-1);
is selecting the frame to play from the folder. And currently it automatically goes to the next frame in the new iteration of the loop with currentFrame+1
, and you want to change this so that currentFrame only +1
when the space key is pressed.
To do this:
- At line 65 insert
spacePressed = true;
(opengl detects space key pressed at current render loop iteration) - Change the control logic at L80:
currentFrame = spacePressed ? std::min(currentFrame+1, N-1) : currentFrame;
- Recompile the cpp code from the
build
folder withmake
This should do the job.
from diffcloth.
Thanks for your timely answer and explanation for the control logic.
I think this should also reset spacePressed = false;
after currentFrame = spacePressed ? std::min(currentFrame+1, N-1) : currentFrame;
to work.
Thanks again!
from diffcloth.
Related Issues (20)
- Regarding codebase release!! HOT 4
- Animated cloth simulation on avatars HOT 9
- Use c++17 std::filesystem HOT 2
- Run clang format over DiffCloth HOT 3
- Simulation with dirvenable human model HOT 1
- How to set param in FabricConfiguration? HOT 2
- Some question about the warning in /src/code/simulation/Triangle.cpp HOT 4
- how to simulate my garment into DiffCloth HOT 1
- Application Porting? HOT 2
- Code released: physics engine or optimizers! HOT 6
- custom simulation instructions
- Where do you get your bending energy formulation from ? HOT 1
- Tirangle_K optimisation HOT 2
- Question about cloth material optimization
- Licensed under MIT license? HOT 1
- Trouble building for Windows 10/11 HOT 1
- Possibility of adding more obstacles? HOT 4
- Pip subprocess error HOT 2
- Restore windows support. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diffcloth.