POV-Ray : Newsgroups : povray.general : POV-Ray Includes - Organisation : Re: POV-Ray Includes - Organisation Server Time
1 Aug 2024 00:24:37 EDT (-0400)
  Re: POV-Ray Includes - Organisation  
From: ingo
Date: 5 Dec 2006 13:44:41
Message: <Xns9890C8DAB5F5Eseed7@news.povray.org>
in news:456ec72e@news.povray.org Chris Cason wrote:

> Randall Sawyer wrote:
>> What if the contents of each include file be strictly limited to ONE
>> macro/object or ONE class of macros/objects/textures/etc? 
>> Furthermore, 
> [snip]
> 
> I'm inclined to go along with this, at least for macros/objects.

I think it will be restrictive quite soon when working on complex 
includes.

>[...] If it doesn't want to depend on another include for
> some other macro that the author already has but doesn't want to go
> to the trouble of releasing separately, then that macro (or
> declarations, or whatever) must be local to the file and not visible
> from outside, so as to not pollute the namespace and potentially
> cause collisions. 

how about the possibility of including 'packages' of includefiles. Think 
for example of Jaime's lightsys. It consists of several files and lots 
of macros and data. Now if we could just '#include lightsys' and in one 
go include all files in the directory /lightsys and put them all in the 
lightsys namespace, the potential of collisions gets a lot less. I'm not 
good at explaining this so maybe have a look at how Python deals with 
standard and third party libraries and namespaces. It's done very user 
friendly.

#include MMMM  (a library (directory) consisting of 7 includefile 
sharing a lot of code)

object { 
   MMMM.Parametric (
     function(u,v){R*sin(v)*cos(u)},
     function(u,v){R*cos(v)},
     function(u,v){R*sin(v)*sin(u)}
     <0, FromV(0)>, <pi, 2*pi>,
     20, 10, ""
   )
   pigment {rgb 1}
   finish{specular 0.3}
 }

Ingo


Post a reply to this message

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