POV-Ray : Newsgroups : povray.advanced-users : Directly accessing array value in array of arrays : Directly accessing array value in array of arrays Server Time
26 Apr 2024 03:58:38 EDT (-0400)
  Directly accessing array value in array of arrays  
From: Bald Eagle
Date: 6 Apr 2017 16:55:00
Message: <web.58e6aa331b66056880403a200@news.povray.org>
Let's suppose I have:



#version 3.7;
global_settings {assumed_gamma 1.0}


#declare Scalar = array [5] {0, 1, 2, 3, 4}
#declare Vector = array [5] {<0, 0, 0>, <1, 1, 1>, <2, 2, 2>, <3, 3, 3>, <4, 4,
4>}
#declare String = array [5] {"A", "B", "C", "D", "E"}

#declare BigArray = array [3] {Scalar, Vector, String}



How do I access one of the values in the sub-arrays through BigArray / in a
single step ?
It doesn't appear that there's a sensible syntax for that.

#declare Var1 = BigArray[0];
would only make Var1 the whole scalar array, and it's only a 1-dimensional array
of 3 other arrays, so I can't use two bracketed values...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.