POV-Ray : Newsgroups : povray.general : POV-Ray Includes - Standards : Re: POV-Ray Includes - Standards Server Time
31 Jul 2024 16:17:49 EDT (-0400)
  Re: POV-Ray Includes - Standards  
From: Ben Chambers
Date: 27 Nov 2006 21:33:58
Message: <456ba016$1@news.povray.org>
Chris B wrote:
> collection, because it's too much hassle. Maybe a solution to this is that 
> we document a standard, but don't insist people use it.

That's worse than having no standard, because then you have to check 
whether or not its standardized...

My opinion is, you make a standard, and stick to your guns.  People are 
still free to make their own files, and distribute them the 
old-fashioned way, so noone's really losing anything.  But for such a 
collection to be useful, standards are the way to go.

That being said, I think a few basic standards should be enough:
1) Each include file deals with only one object / texture / function / 
whatever (see #5 below for an exception).
2) No hard-coded sizes, everything must be parameterized.
3) All items should be generated by a macro for consistency.  If all 
you're doing is declaring a texture, still generate it by macro to match 
the consistency of everything else in the archive.
4) The name of said macro should be identical to the file name, but for 
heaven's sake, avoid Hungarian notation like the plague it is!
5) Where it makes sense, objects that can take advantage of 
randomization should come in two flavors: a basic one, with no 
randomization, and a random one (append the macro with _r if you must) 
which accepts as an additional argument, a random number stream.  This 
allows you to use your own random streams in the object creation process.

I think that's everything; at least, I can't think of anything else off 
the top of my head.

...Chambers


Post a reply to this message

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