POV-Ray : Newsgroups : povray.general : how to call multiple instances of a macro? : Re: how to call multiple instances of a macro? Server Time
30 Jul 2024 12:32:11 EDT (-0400)
  Re: how to call multiple instances of a macro?  
From: Christian Froeschlin
Date: 11 Mar 2009 18:15:52
Message: <49b83818$1@news.povray.org>
CShake wrote:

> I have a related question - is it possible to pass the name of a macro 
> as a parameter in another macro? 

I don't think that's possible.

> I notice in the documentation that it 
> doesn't say that RVALUE can be a function

Well it does say RVALUE can be a USER_FUNCTION in 3.8.4.2.

> stringOfLights("lamp1",<1,2,3>,10)

I you want to have multiple macros building on your lamp1
to lamp24 you might write a wrapper macro as follows

#macro lamp(lamp_type,location,pointat,brightness)
#switch (lamp_type)
#case(1) lamp1(location,pointat,brightness) #break
#case(2) lamp2(location,pointat,brightness) #break
...
#end
#end


Post a reply to this message

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