loop objects - loop, or animate, a series of geometry objects
Name
loop objects - loop, or animate, a series of geometry objects
Summary
Name loop objects
Type mapper
Inputs geometry
Outputs geometry
Parameters
Name Type Default Min Max Choices
loop toggle off
direction radio forward forward,
reverse
current object typein $NULL
num of objects integer 0 0, unbounded
speed float 1.0 0.0, 1.0
dwell float 0.0 0.0, 1.0
clear oneshot
Description
Loop objects is a coroutine module that provides a mild form of
animation by providing the capability of looping a series of geometry
objects. The result is that all of the controls (object, camera, and
light transforms, etc.) that are available through the render geometry
module remain available before, during, and after looping. The objects
to be looped may be single objects or several objects grouped under a
parent object. As each object (or family) is received, loop objects
makes a note of it and creates a parent for it named "loop_objx", where
x is the index of the object in the series. The entire series is given
the parent "loop_objects". Animation is accomplished by altering the
visibilities of the objects so that only one is visible at a time.
Inputs
Input Geometry
The input for loop objects may be any type of geometry object.
Each object may be a single object or a family of objects grouped
under a single parent object.
Parameters
loop
The loop parameter enables animation if it is set to on. If it is
set to off, objects (or "frames") may be single-stepped or accessed
directly.
direction
If the direction parameter is set to "forward", progress through
the series of objects is in the same order (or direction) as they
were received. "Reverse" reverses this order (duh!). If loop is
off, the direction buttons are used to step through the series of
objects -- pressing "forward" steps forward one object; "reverse"
steps backward one object.
current object
Loop objects uses the current object parameter to indicate which
object is being displayed. If loop is off, the user may go
directly to an object by entering the number of the desired object
as the current object.
num of objects
Loop objects uses the num of objects parameter to indicate the
number of objects in the series. When a new object is received or
an object is deleted, this value is updated by loop objects. Any
user-entered values are ignored.
speed
The speed parameter influences the rate at which the objects are
looped. The value of the speed parameter ranges from 0.0 to 1.0
and indicates a relative speed -- 0.0 means to loop the objects
very slowly; 1.0 means to loop them as fast as possible. The actual
looping speed is greatly dependent on the rate at which the render
geometry module can render the scenes. If a series of objects run
from simple objects to very complex ones, the apparent speed of the
looping will seem to slow down since the more complex scenes take
longer to render.
dwell
The dwell parameter influences the amount of time that loop objects
will pause on the "last" object. The "last" object is the last
object in the series if the direction is forward; the first if the
direction is "reverse". The value of the dwell parameter is a
relative value too -- 0.0 means to not pause at all; 1.0 means to
pause "a while".
clear
The clear parameter is a oneshot that is used to delete one or all
of the objects. If loop is on, selecting clear will delete all of
the objects in the series. Since doing so accidentally could be
catastrophic, the user is given a chance to bail out. If loop is
not on, only the current object is deleted. No second chance is
given in this case. After deleting an object, the values displayed
as the current object numbers will reflect the positions of the
objects in the new, shorter series, not their positions in the
original series. If the entire series is cleared (with loop on),
all of the indexing parameters are reset.
Outputs
Output Geometry
Each of the objects in a loop series is unchanged from the input
object except that it is given a parent object named "loop_objx",
where x is the index of the object in the series. When an object
is delete, the names of the other objects do not change -- they
continue to reflect the orginal positions of the objects the
original series. The entire series of objects to be looped are
grouped under a single parent object named "loop_objects".
Examples
This example demonstrates how to use the loop objects module to animate
a series of isosurfaces generated from a field. As each new value for
an isosurface is selected, the new isosurface object is passed through
loop objects. When all of the desired isosurfaces have been created,
the loop parameter can be turned on and the series will be animated.
READ FIELD
|
ISOSURFACE
|
LOOP OBJECTS
|
RENDER GEOMETRY
|
DISPLAY PIXMAP
The same network can be used to animate a series of isosurfaces of the
same value, but from different fields. In this case, changing the
name of the field file causes a new isosurface to be created.
Limitations
When an individual object is deleted, there will be a loss of consis-
tency between references to each of the objects in the series after the
one deleted. The reference to an object by the current object parameter
and the reference to the same object by its object name will no longer
be the same. This may be inconvenient, perhaps even confusing, but I
couldn't think of any good (easy) way around this problem. Sorry.
Author
Phil McDonald, NOAA/ERL/Forecast Systems Laboratory
NOAA/ERL/Forecast Systems Laboratory
AVS Modules loop objects