POV-Ray : Newsgroups : povray.binaries.scene-files : Making #includes self-renderable - e.g. reference_axis.inc : Re: Making #includes self-renderable - e.g. reference_axis.inc Server Time
1 Sep 2024 12:22:45 EDT (-0400)
  Re: Making #includes self-renderable - e.g. reference_axis.inc  
From: nemesis
Date: 30 Nov 2006 04:40:00
Message: <web.456ea5fa6e4b56283976a8750@news.povray.org>
yes, good usage for the proposed Main_POV_File variable. :)

but if we're getting such code in all include files -- rather than letting a
server-side script render sample scenes for the includes -- we could still
go one better by having a quick_setup macro of sorts and call that for the
subject object, instead of relying on bug-prone manual copying-pasting or
per-include setups.

Like, instead of:

#if (strcmp(Main_POV_File, "reference_axis.inc") = 0 )
//background {rgb 1}
camera { location  <5,5,5> look_at <0,0,0> direction <0,0,2> sky y up y
right x*image_width/image_height   } //POV standard L/H
//camera { location  <5,5,5> look_at <0,0,0> direction <0,0,2> sky z up z
right x*image_width/image_height   } //Z up, CAD R/H
light_source {<500,500,500> color rgb 1}
object{Reference_Axis}
#end

you'd get something like:

#if (strcmp(Main_POV_File, "reference_axis.inc") = 0 )
  #include "stdsetups.inc"; quick_setup( Reference_Axis )
#end

which would render a standard demo scene setup for said object.  It could
take the object's bounding box information for correctly setting relative
camera and lighting positioning.

ah!  the beauty of abstracting details away... :)


Post a reply to this message

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