POV-Ray : Newsgroups : povray.general : How to permit null objects? Server Time
8 Aug 2024 12:26:23 EDT (-0400)
  How to permit null objects? (Message 11 to 14 of 14)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Wlodzimierz ABX Skiba
Subject: Re: How to permit null objects?
Date: 7 Feb 2001 05:38:44
Message: <3a8125b4@news.povray.org>
Greg M. Johnson wrote in message <3A802B51.CC97C5D2@my-dejanews.com>...
> Again, with great respect to Peter H,  it's quite likely I'll make something
> less user-friendly than his is, but it at least will be designed around *my*
> objectives . . .


you have great ideas
but instead of null objects can't you use #if defined() syntax ?

ABX


Post a reply to this message

From: Warp
Subject: Re: How to permit null objects?
Date: 7 Feb 2001 08:15:34
Message: <3a814a75@news.povray.org>
Greg M. Johnson <gre### [at] my-dejanewscom> wrote:
:> :> Use a macro.
:> : Thanks but no.
:>   Why not?

: The problem is how do I keep this modular approach if I'm missing some
: objects in the file.  Perhaps Art's suggestion of defining these fingers
: as sphere{0,0} is the best.

  I really don't understand why this excludes using macros.

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

From: Greg M  Johnson
Subject: Re: How to permit null objects?
Date: 7 Feb 2001 08:35:35
Message: <3A814DCC.CE8DA7E4@my-dejanews.com>
Warp wrote:
:>  I really don't understand why this excludes using macros.

I don't understand what a macro would help with in this situation.


Post a reply to this message

From: Disnel
Subject: Re: How to permit null objects?
Date: 9 Feb 2001 06:03:10
Message: <3A83DE66.38DF64BC@hlavacek-partner.cz>
When I want use something like null object in macro parameters I use
array instead of variable:

#macro SomethingWithPossibleNullObject(Object)
  #ifdef (Object[0])
    // Work with it
  #else
    // No object
  #end
#end

SomethingWithPossibleNullObject(array[1])  // Null object
SomethingWithPossibleNullObject(array[1] { sphere{<0, 0, 0>, 1 }) //
Work with sphere

Regards

Disnel


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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