#1 TGLFreeForm.OctreePointInMesh might return incorrect result

open
nobody
None
5
2009-03-11
2009-03-11
Siege
No

TGLFreeForm.OctreePointInMesh does not test ray far enough to be sure if point is out/inside mesh.
I propose a solution:

CHANGE:

BRad := BoundingSphereRadius;

rayVector := VectorMake(2*random-1, 2*random-1, 2*random-1);
rayStart := VectorAdd(VectorScale(rayVector, -BRad), Point);

TO:

BRad := 2*BoundingSphereRadius;

rayVector := VectorMake(2*random-1, 2*random-1, 2*random-1);
NormalizeVector(rayVector);
rayStart := VectorAdd(VectorScale(rayVector, -BRad), Point);

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks