|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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> ...)
Logical, trace thinks that "obj" is an object identifier and nothing else...
How to tell that it is a variable?
regards,
Thorben
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> but this does not work in povray, does it?
If I understand you correctly, you want to do something like this (code
from shapes.inc):
#macro Isect(Pt, Dir, Obj, OPt)
#local Norm = <0,0,0>;
#local IPt = trace(Obj, Pt, Dir, Norm);
#if (vlength(Norm) > 0)
#declare OPt = IPt;
#local Return=true;
#else
#local Return=false;
#end
(Return)
#end
HTH,
Florian
--
$ping http://www.real-life.org
ping: unknown host
[------------ http://www.torfbold.com - POV-Ray gallery ------------]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|