SubLoop

Synopsis

The output of one AVS/Express loop triggers the SubLoop module, which starts another loop in the same Application. Single steps forward and backward are possible without having an external trigger.

Input Ports

Name Type Description

trigger int Trigger for the next step of the loop. This should be connected to the count port of the main (endless) Loop module of the application.

Parameters

Name Type Description UI Control

reset int Reset Loop count to the start value. UItogle
reset_back int Reset loop count to the end value. UItogle
run int Starts looping whenever the trigger changes. UItogle
run_back int Starts looping backwards whenever the trigger changes. UItogle
step int increment loop count by incr UItogle
step_back int decrement loop count by incr UItogle
cycle int cycle loop once, cycle or bounce UIchoice
start float The start value for loop count UIfield
end float The end value for loop count UIfield
incr float The value the loop count is changed by on each step UIfield

Output Ports

Name Type Description

count float current value
done int set to 1 when SubLoop reaches end value

Description

The SubLoop module is used to generate several loops within one AVS/Express application. This module uses the output of another loop module to as trigger for its internal loop. It has all the capabilities of the standard AVS/Express Loop module. The advantage of this module is that it does not run an endless loop which interferes with other modules.

To use two completely independent loops the application should contain a standard loop module and two SubLoop modules. Both SubLoop modules get their trigger from the Loop module which performs an endless loop. The SubLoop modules can then transpose the output from the Loop module into the values needed for the actual animation.

Inputs

trigger

When trigger (int) is updated and the SubLoop module is in run or run_back mode the SubLoop executes its next step.

Parameters

run

Toggle (int) that starts the loop whenever the trigger is activates. Runs the loop forward (adds the incr value to the loop count).

run_back

Toggle (int) that starts the loop backwards whenever the trigger is activates. Runs the loop backwards (subtracts the incr value from the loop count).

step

Toggle (int) that executes the loop once (adds the incr value to the loop count).

This does not depend on the trigger beeing activated.

step_back

Toggle (int) that executes the loop once backwards (subtracts the incr value from the loop count).

This does not depend on the trigger beeing activated.

reset

Toggle (int) that sets the loop count to the start value.

reset_back

Toggle (int) that sets the loop count to the end value.

cycle

Choice (once/cycle/bounce) that decides the loop behaviour whenever the loop counter reaches the end-value:

start

Start value (float) for the loop counter.

end

End value for the loop counter.

incr

Increment in each step of the loop.

Outputs

count

The current value of the loop counter.

done

This value is set if the Loop has reached its end value if it is executed once.

Utility Modules

The User Macro SubLoop makes use of the Functional Macro SubloopFunc and the UI Macro SubLoopUI.

Example

An example application SubLoopEg is provided, which reads a field file and shows two animated orthoslices running at the same time.

Files

iac_proj/subloop/sloopmod.v contains the V definitions of the SubLoopParams parameter block and the SubLoopCore module.

iac_proj/subloop/sloopmac.v contains the V definitions of the SubLoopFunc Functional Macro, the SubLoopUI User Interface Macro, and the SubLoop User Macro.

iac_proj/subloop/sloopapp.v contains the V definition of the example application SubLoopEg.

Author

Tobias Schiebeck
International AVS Centre

Contact

International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL