Creating Structures of Images with Iterations

adamfenn28's picture

I'm having a couple issues..

I'm trying to find a way to create a structure of images from a structure of strings. I've tried to use use iterator to convert the strings to images, but I can't find a way to return a structure of the resulting images. When I do try to return something from an iteration, I get the value of a single instance, not all of the iterations, wrapped up nicely in a structure. Is there a way to do this?

Similarly, I'd like to pass something to an iteration loop, and return a value based on data from each of the instances. For example. If I wanted to create a 'sum' function that took a structure of numbers as input and added each of them together and returned the sum. Iterator looks like the right thing to do this with, but I can't see how to pass data from one iteration to the next.

How can I solve these issue?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cybero's picture
Re: Creating Structures of Images with Iterations

Fairly lame example, probably half a dozen ways of doing this better, this might point you in the right sort of direction [I hope] :-)

Based upon the Quad Structure example with GLTools, thus needs GLTools [1.6].

With iteration included at no extra cost, except on the fps •~

jrs's picture
Re: Creating Structures of Images with Iterations

From memory you can use a queue (each of the iterations gets added to the queue) and then use the kineme spooky tools to get the queue out of the iterator and back up to a higher level