Function that changes it to the next state when next button is pressed. Checks to see if it is at the last state, in which it can't go any further forward and prints warning message
Function that changes it to the previous state when prev button is pressed. Checks to see if it is at the first state, in which case it can't go back any further and prints warning message
If the reference state button is pressed. This is where the resultant displacement is calculated based off a selected state and model rather than state 0 of each model
Entered when the user manually changes the state value. Checks if the state is valuid, if not prints warning message and changes it to the last state via the last state function