POV-Ray : Newsgroups : povray.general : Question 'bout indentation (no flamewar) : Re: Question 'bout indentation (no flamewar) Server Time
12 Aug 2024 03:32:16 EDT (-0400)
  Re: Question 'bout indentation (no flamewar)  
From: Roland Mas
Date: 29 Mar 1999 13:22:14
Message: <m3emm8cg15.fsf@clodomir.rezel.enst.fr>
"Thorsten Froehlich" <fro### [at] charliecnsiitedu> writes:

>                         #if (A > 0)
> union
> {
>                         #endif
>     sphere { ... }
>                         #if (A > 0)
>     sphere { ... }
> }
>                         #endif

Nah.  Doesn't work.  The first sphere is indented and should only be
so if A > 0.

> OR BETTER
> 
> 
> #declare mySphere1 = sphere { ... }
> #declare mySphere2 = sphere { ... }
> 
> #if (A > 0)
> union
> {
>     sphere { mySphere1 }
>     sphere { mySphere2 }
> }
> #else
> sphere { mySphere1 }
> #endif

  Yes.  Works better, for sure.  I had thought of it, but it only
works for small scenes.  If you have plenty depending on A, it becomes
really hard to read.
-- 
Roland Mas

A man walks into a bar.  Bang.


Post a reply to this message

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