|
![](/i/fill.gif) |
In article <3D2389CA.9E4E78B2@hotmail.com>,
Tor Olav Kristensen <tor### [at] hotmail com> wrote:
> I think that my RayIntersectsTriangle() macro in the code below
> provides such a shortcut (*), but I'm not sure yet if it is optimal.
>
> (*) Not really for lines, but for rays (which has a defined direction)
I haven't really been following this conversation, so I might be missing
something, but wouldn't this be a better way?
#macro RayIntersectsTriangle(pRay, vRay, pA, pB, pC)
#local iNorm = < 0, 0, 0>;
#local tmpTri = triangle {pA, pB, pC}
#local Scrap = trace(tmpTri, pRay, vRay, iNorm);
(iNorm.x != 0 | iNorm.y != 0 | iNorm.z != 0)
#end
--
Christopher James Huff <chr### [at] mac com>
POV-Ray TAG e-mail: chr### [at] tag povray org
TAG web site: http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |