POV-Ray : Newsgroups : povray.programming : [BUG] POVRay excessive memory consumption : Re: [BUG] POVRay excessive memory consumption Server Time
5 Jul 2024 14:37:25 EDT (-0400)
  Re: [BUG] POVRay excessive memory consumption  
From: Thorsten Froehlich
Date: 29 Jan 2004 22:40:17
Message: <4019d221@news.povray.org>
In article <40197115@news.povray.org> , Wolfgang Wieser <wwi### [at] gmxde>  
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...

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.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

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