POV-Ray : Newsgroups : povray.general : POV-CSDL (or Java Binding?) : Re: POV-CSDL (or Java Binding?) Server Time
10 Aug 2024 11:19:36 EDT (-0400)
  Re: POV-CSDL (or Java Binding?)  
From: Nigel Stewart
Date: 15 Mar 2000 21:04:34
Message: <38D040E1.575D2E5@nigels.com>
> > >     I think the "interface block" concept is the most promising
> > >     formulation that we have so far.  It's something like
> > >     the main(..) function in C, you're only allowed to have one.

> Er, I meant you can't have the include files request values. Oops! :-)

	That's right - but this is actually a feature - it puts
	one module in control of user interaction.  

	You simply design the script to pass values from the
	interface block to the included files, or to the
	macros.  Something like:

interface
{
	#declare ShowBackground = 1;
	#declare ShowLandscape = 1;
	#declare NumberOfTrees = 100;
}

#if (ShowBackground)
  #include "background.inc"
#end

#if (ShowLandscape)
  #include "landscape.inc"
#end

// The Trees include uses TREES_NUMBER to
// control the number of generated trees.

#declare TREES_NUMBER = NumberOfTrees;
#include "trees.inc"


--
Nigel Stewart (nig### [at] nigelscom)
Research Student, Software Developer
Y2K is the new millenium for the mathematically challenged.


Post a reply to this message

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