|
|
Hello,
With this code :
...
#declare ListOfLines = array[nbLines][2];
...
#macro drawLine(thisLine,lRadius,lColor)
cylinder {
thisLine[0], thisLine[1], lRadius
pigment { color lColor }
finish { specular 1 brilliance 2 }
}
#end
...
#declare lineIndex=0;
#while(lineIndex<nbLines)
drawLine(ListOfLines[lineIndex],0.05, GreenYellow) <<< error here !
#declare lineIndex= lineIndex+1;
#end
The array "ListOfLines" contains start and end points of lines.
ListOfLines[i][0]=<x1,y1,z1>;
ListOfLines[i][2]=<x2,y2,z2>;
and so on
Running this code raise en error :
Parse Error: Expected '[', , found instead
for the line highlighted above
The macro drawLine can't understand that "thisLine" parameter is an
array of two elements.
So it seems that i can't pass an array as a parameter to a macro ?
Is my prognosis correct and is there any solution (other than split
array's item into two variables).
Thanks
--
Kurtz le pirate
Compagnie de la Banquise
Post a reply to this message
|
|