POV-Ray : Newsgroups : povray.programming : Custom povray scene file reader (parse.cpp + tokenize.cpp) : Re: Custom povray scene file reader (parse.cpp + tokenize.cpp) Server Time
17 May 2024 05:34:09 EDT (-0400)
  Re: Custom povray scene file reader (parse.cpp + tokenize.cpp)  
From: Christoph Hormann
Date: 4 Mar 2006 18:00:03
Message: <dud652$h4n$1@chho.imagico.de>
human_2.0 wrote:
> I want to make a povray scene file reader to convert the files to a
> different format.  I thought I could do it from scratch, but I'm finding
> little catches all over.  I've not studied lexers much.  I was just
> thinking that writing a custom binary with povray's own parse.cpp and
> tokenize.cpp would probably be the easiest solution, and have it print out
> a list of obects or something like that.
> 
> Would this be easier for someone unfamiliar with the povray source code than
> writing my own parser?  I code in Perl mostly but can read c++.

See:

http://tag.povray.org/povQandT/filesQandT.html#povtootherformatsdifficulty

You would hardly have any advantage of using code from just parse.cpp 
and tokenize.cpp to write a POV-SDL reader - most parts of POV-Ray are 
needed for correctly interpreting a scene file.

The only practicable way to 'convert' a POV-Ray scene would be modifying 
POV-Ray itself to do so.

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.imagico.de/ (Last updated 31 Oct. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

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