[Up] [Previous]

10.1.5 Blinker Engines

Blinker engines directly modify the traversal state of a scene graph by causing particular pieces of the graph to be cycled through. The most obvious use of this is to cause objects to repeatedly appear and disappear from view, hence the name "Blinker". This class of engine is derived from the Switch group node, which controls which of several pieces of a scene graph can be traversed. The Blinker adds an animation effect by continually cycling traverals of its children, one child at a time. Even if the Blinker engine only has one child, the effect of that child on the scene will alternately appear and disappear.

The important fields are:

Example

Here is a complete Inventor .iv file for an example that uses a Blinker engine node to alternate between displaying a cube and a cone. Just cut and paste the text into a file named test.iv and then do ivview -q test.iv:

#Inventor V2.0 ascii

Separator {
    PerspectiveCamera {
	position	0 0.5 10
    }
    Blinker {
	whichChild	0
	speed	0.5
	Separator {
	    Translation {
                translation  -2 0 0
	    }
	    Cone {
	    }
	}
	Separator {
	    Translation {
                translation  +2 0 0
	    }
	    Cube {
	    }
	}

    }
}

You should note several things about this example:

More Information

More information about Blinker engines is available in chapter 13 of Inventor Mentor and in the man page for SoBlinker.


MIT home page HTML written and maintained by Reid M. Pinchback (reidmp@mit.edu)
Last modified 96/06/11; copyright © 1996 MIT