|
![](/i/fill.gif) |
This would be trivial to implement with macros. Especially when (if) the
Superpatch's #ifdef(Array[Elem]) function makes it into the official
version. Until then the size of the array would need to be specified.
For example, array rotate:
#macro ARot(Array,ArraySize,RotVect)
#local C=0;
#local NewArray=array[ArraySize]
#while(C<ArraySize)
#local NewArray[C]=vrotate(Array[C],RotVect);
#local C=C+1;
#end
NewArray
#end
#declare Array1=array[N]{...}
#declare Array2=ARot(Array1,N,<XRot,YRot,ZRot>)
Margus
J. Grimbert wrote in message <3740210A.4E1BDC0E@atos-group.com>...
>
>What is needed is probably more something like array operator.
>After all, pov have :
> rotate and translate for objects
> vrotate and + for vectors
>
>We may probably get a nice enhancement with something like
> arotate and atranslate for array of vector
>
>#declare new_array = arotate(old_array, B );
>
>and
>#declare new_array = atranslate(old_array, B);
>
>BTW, we could also need some scaling:
>#declare new_array = ascale(old_array, B);
>
Post a reply to this message
|
![](/i/fill.gif) |