POV-Ray : Newsgroups : povray.general : inside_vector ??? : Re: inside_vector ??? Server Time
5 Aug 2024 20:22:01 EDT (-0400)
  Re: inside_vector ???  
From: Le Forgeron
Date: 6 Sep 2002 05:37:11
Message: <3D787760.6040002@free.fr>
Warp wrote:

> Slime <slm### [at] slimelandcom> wrote:
> 
>>To determine if point A is inside the mesh, with the information that point
>>B *is*, shoot a ray from point A to point B, counting the number of times it
>>intersects the mesh. If it intersects an even number of times (counting 0 as
>>even), then A is inside the mesh.
>>
> 
>   Possibly, but AFAIK the intersection test of a ray and the mesh returns
> all the intersections,


It should, but the mesh code is 'optimised' to return only the nearest.
At least it was so in 3.1 code. It was one of the two reason Mesh where 
bad in CSG (there is a kludge in the mesh code testing if the 
intersection is part of a CSG or not, if not only the first intersection 
was computed).
And I still do not trust mesh now.


Post a reply to this message

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