|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |