user int variable at state and reading previous value

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
barak ostraich
Posts: 42
Joined: Thu Apr 12, 2018 12:17 am

user int variable at state and reading previous value

Post by barak ostraich » Sat Jul 10, 2021 1:05 am

i need to add some int variable to the state, it counts the times other variable is passing zero.
at my custom force I need to read the previous value and add 1 to it on some condition.
1. how can i set discreet var and change its value ?
2. how can i get to the previous state var inside computeForce(const SimTK::State& s..... ?

Tags:

POST REPLY