From: Andrew Coppin
Subject: Multidimensional arrays
Date: 15 Oct 2003 08:56:09
Message: <3f8d43e9$1@news.povray.org>
Quoting the POV-Ray manual, section 6.1.8.1:
"Although it is permissible to reference an entire array as a whole, you may
not reference just one dimension of a multi-dimensional array."
Naturally enough, this is EXACTLY what I want to do... Why does this
limitation exist? How do I get round it?
Thanks.
Andrew.
On Wed, 15 Oct 2003 13:52:48 +0100, "Andrew Coppin" <orp### [at] btinternetcom>
wrote:
> Naturally enough, this is EXACTLY what I want to do... Why does this> limitation exist? How do I get round it?
Instead of defining multidimensional array, define array of arrays:
#local Array1 = array[2][3]; // mutidimensional array
#local Array2 = array[2];
#local Array2[0] = array[3];
#local Array2[1] = array[3];
Now you can reference one dimension of array as well as whole array and each
element.
ABX
From: Andrew Coppin
Subject: Re: Multidimensional arrays
Date: 15 Oct 2003 11:02:46
Message: <3f8d6196@news.povray.org>
> > Naturally enough, this is EXACTLY what I want to do... Why does this> > limitation exist? How do I get round it?>> Instead of defining multidimensional array, define array of arrays:>> #local Array1 = array[2][3]; // mutidimensional array>> #local Array2 = array[2];> #local Array2[0] = array[3];> #local Array2[1] = array[3];>> Now you can reference one dimension of array as well as whole array and
each
> element.
Curiose... That should be in the docs!
Thanks.
Andrew.