|
![](/i/fill.gif) |
Thorsten Froehlich wrote:
> In article <40197115@news.povray.org> , Wolfgang Wieser <wwi### [at] gmx de>
> wrote:
>
>> Is there a define/const int anywhere which tells me the size
>> of the COLOUR array?
>>
>> Hard-coding the size 5 into MY code seems to be the worst solution.
>
> Well, there is nothing in there that says it has to be a float, does it?
> So this should read sizeof(COLOUR)/sizeof(COLC) if you really insist on
> the rather pointless idea to assume the COLOUR could ever change its
> number of componenents in 3.x code...
>
Actually, I had in mind that color is "an array of 5 floats" and I did
not look it up to see that it is really COLC when writing the code.
But, right, COLC is certainly better.
> The "correct" way to implement you interpolation would be to follow
> current implementation, which is to put the interpolation into a macro or
> inline
> function in colour.h . This way anybody who might really want to try to
> change the number of color components could easily find your code next to
> the other code operating on colors.
>
Yes. But in order to make hand-patching future versions of POVRay more
easy for me, I decided to put as much code as possible into one extra
file.
There is no doubt that in case one actually wants to integrate this
patch into megapov or povray, some code has to be placed at different
locations.
Wolfgang
Post a reply to this message
|
![](/i/fill.gif) |