POV-Ray : Newsgroups : povray.programming : oddity in media.cpp : Re: oddity in media.cpp Server Time
30 Jun 2024 12:01:41 EDT (-0400)
  Re: oddity in media.cpp  
From: Andrew Clinton
Date: 17 Oct 2004 14:31:18
Message: <pan.2004.10.17.19.31.17.341174@uwaterloo.ca>
On Sun, 17 Oct 2004 11:25:02 +0200, Wolfgang Wieser wrote:

> Nathan Kopp wrote:
> 
>> Looking at it all these years later, the only think I know for sure is
>> that this is ugly code in high need of refactoring and better
>> commenting!
>> 
> Actually, I had a look at the media code some time back when
> experimenting with media-based clouds and got the same impression. After
> having patched it so that half of these "dozens of function arguments"
> were stuffed into one data structure, I begun to understand what it was
> doing...
> 
While we are complaining about media... I was also trying to make some
modifications to the media code to permit varying the lists of media that
are considered at run-time (for example, to use an bounding hierarchy to
limit the media that need to be sampled).  However, to do this would
require changing tons of the code that has explicit dependence on the
"array of linked list" of media objects, making it nearly impossible to
make the change without in depth knowledge of how all the media code is
working.  If this code is rewritten, it would be SO much easier if this
were better abstracted (use of an object to represent media lists).  From
what I can tell, same goes for a lot of the other code in media (or
POV-Ray for that matter, at least the bounding and object related stuff
I've looked at)

Andrew


Post a reply to this message

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