POV-Ray : Newsgroups : povray.newusers : giving varying object names to macros?? : Re: giving varying object names to macros?? Server Time
30 Jul 2024 04:13:51 EDT (-0400)
  Re: giving varying object names to macros??  
From: Thorben
Date: 17 Sep 2004 10:00:00
Message: <web.414aed0a3618a2f5a9d61c940@news.povray.org>
Funny, it seems that some part of my message got lost, so here are the
missing parts:
> I want to call my macro with varying objects, the object identifier is given
> as a macro argument. example:
>
> #declare result = mytraceenhancement(myobject5, <3,4,1>, <0,-1,0> ...)

#macro mytraceenhancement(obj, somepoint, somenormal, ...)
 #local resultnormal = <0,0,0>
 #local my_xyz = trace(obj, somepoint, somenormal,resultnormal)
 ... //enhancementstuff
#end

Logical, trace thinks that "obj" is the object identifier itself...

> How to tell that it is a variable?

i would like to do this like:

.... trace($OBJ, somepoint ...

but this does not work in povray, does it?

> regards,
>
> Thorben


Post a reply to this message

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