|
![](/i/fill.gif) |
"[GDS|Entropy]" <gds### [at] hotmail com> wrote:
> I just want a List<T> right about now...
Yeah, I know that feeling ;) Some "foreach" would come in handy, too... oh, I
see you mention that in your post as well...
> List<vector> myList = new List<vector>();
#declare mySize = 6;
#declare myArray = array[mySize];
> while (n < 6)
> {
#declare n = 0;
#while (n < mySize)
> myList.Add(<Math.Sin(n),n,Math.Cos(n)>)
#declare myArray[i] = <sin(n),n,cos(n)>;
> n++;
#declare n = n + 1;
> }
#end
> foreach(vector v in myList)
> {
#declare n = 0;
#while (n < mySize)
#declare v = myArray[n];
> testRay(v,cam_pt,myObject)
testRay(v,cam_pt,myObject)
> }
#declare n = n + 1;
#end
> Is there a way to do this in povray?
See above. It *should* to the job, although I might have added some typos.
It gets somewhat problematic if you need to later add more elements to the array
though: There simply isn't such a thing as a List<T> in POV SDL.
> My second question: I have an object constructed thusly-I translate an
> object(a) into an "object(b) of objects(a)" in one loop, then translate that
> "object(b)" into an "object(c) of objects(b)". Is there a way using an array
> as specified above, to determine the end position in object(c) of each
> object(a) using vtransform (or something)? Am I close?
I must confess I haven't a clue what you intend to do. Can you try to rephrase
that?
> I am half considering just writing a freaking C# program to dump my vectors
> into a file, which I could import into povray...but thats a really ugly
> solution.
I think at times it's a much more beautiful one ;)
Post a reply to this message
|
![](/i/fill.gif) |