POV-Ray : Newsgroups : povray.general : POV-CSDL (or Java Binding?) : Re: POV-CSDL (or Java Binding?) Server Time
10 Aug 2024 11:26:14 EDT (-0400)
  Re: POV-CSDL (or Java Binding?)  
From: Chris Huff
Date: 15 Mar 2000 17:14:09
Message: <chrishuff_99-FF5E8B.17160415032000@news.povray.org>
In article <38CF8393.4C9C700B@nigels.com>, nig### [at] eisanetau wrote:

> 	The "base level interface" of POV has always been a command
> 	line with standard input and standard output available.
> 	I'm sure the Windows guys can supply you with a dialog box,
> 	and similarly for other non-text-terminal style incarnations
> 	could manage this very basic requirement.

You might be surprised to learn that the Mac version of POV does not 
have an accessible command line. None. And the only text input is the 
scene file and optionally an .ini file(usually, those preferences are 
stored in the actual scene file, in the resource fork).
Maybe this will change in 3.5, though. And you theoretically could 
compile a console version of POV...


> > it would just be too difficult to implement in POV-Script 
> 
> 	<disbelief> Huh? </disbelief>

<frusteration>I was referring to the problem of pre-parsing the scene to 
keep from having long delays before input requests.</frusteration>


> > and impossible to implement in a cross-platform manner
> 
> 	<amusement> Refer to ANSI C Standard: scanf(...) </amusement>

<incomprehension>Er, how would this help in putting up a dialog box and 
getting user input from it?</incomprehension>


> > And then you have to write the dialog code for Mac and Windows
> 	
> 	No, you provide a hook with sensible default behaviour.
> 	(if there is no function pointer, don't prompt.  Simple huh?)

There are output functions for warnings and errors, but I don't know if 
there are input functions(there actually might be, maybe they just have 
never been used). Adding them wouldn't be difficult, but it would 
probably be a better idea to put everything into one standardized 
interface during the conversion to C++. If you can add them in now, go 
ahead!


> > This would be a nice feature, and probably something to think about for
> > POV 4.0
> 
> 	<sarcasm>
> 	Ooooh.... That's an ambitous goal - a C++ port in order to
> 	support a prompt.  Good thinking.  Perhaps C++ would also
> 	help with "general solutions" that don't exist.
> 	</sarcasm>

<exasperation>Did I say this was the only reason to port to C++? No.
I meant this was a good thing to think about and plan for in the design 
of 4.0.</exasperation>


> > but in the current state of POV is just not very
> > plausible. Another good addition to the wish-list, though.
> 
> 	Wish list?  I just about tempted to hack this into POV
> 	and post a binary just to prove you wrong. Let's see,
> 	one reserved word, two numerical parameters, a bit
> 	of cut-paste-and-edit.  Sounds more than plausible.

Go ahead...don't forget to work out the problem of pre-parsing the scene 
while you are at it. :-)

Actually, for now, a simple version of this feature which doesn't do 
pre-parsing would probably be enough, as long as people design their 
code carefully and include files don't require them(maybe a way to turn 
this feature off for sections of code would be a good idea? 
#user_prompts on/off in addition to the prompt_user() function?). The 
function hook for the user prompt could also be hacked in. The 
pre-parsing stuff could be added later, maybe in 4.0.

Or maybe the suggestion of having everything be put in a special block, 
like global_settings, so everything has to be specified at the beginning 
of the scene. This seems too rigid, though.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

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