IBM TJ Watson Research

IBMIncrementer

IBMIncrementer.mp4

Description

A valuator used to increment. To increment a 1.0 input event 'pulse' is multiplied by Factor1 and has Offset1 added. This value is then output and also fed back into Factor1. The routing loop is broken and a new value is not output (see VRML routing loops and using timestamps to break them).

To demonstrate this running a TimeSensor, having a cycleInterval of 1s, is set up looping amd the cycleTime is converted, by another valuator, to a fixed float value of 1.0 and fed into the incrementing valuator. The current value is shown by routing the string output to a Text node.

+----------------------------------+ | | | +=========================+ | | | VALUATOR | | | | | | +--- o Factor1 0.0 | | | | | o Offset1 1.0 | | | | | | | | ----------- o inSFFloat outSFFloat o --+---------- | | +=========================+

Note: The Offset1 can be changed into another number to increment by a different amount. If it were say 3.0, then each time it would increment by 3 etc. And a negative value decrements by that amount. The Factor1 value also can be altered to set an initial value from where the incrementing or decrementing commences.

Screenshot

Snapshot taken while running.



Back to main index