•      Sign In
• Create Account

### #ActualJavierOltra

Posted 29 November 2012 - 06:47 AM

Finally found the problem, this:

[source lang="cpp"]bool IntersectTubo(vec3 rayOrigin, vec3 rayDestination, vec3 tuboA, vec3 tuboB, float tuboRadius){ vec3 pointRay = ClosestPointLineLine(rayOrigin, rayDestination, tuboA, tuboB); vec3 pointTubo = ClosestPointRaySegment(tuboA, tuboB, rayOrigin, rayDestination); return (distance(pointRay, pointTubo) <= tuboRadius);}[/source]

Should be:

[source lang="cpp"]bool IntersectTubo(vec3 rayOrigin, vec3 rayDestination, vec3 tuboA, vec3 tuboB, float tuboRadius){ vec3 pointRay = ClosestPointLineLine(rayOrigin, rayDestination, tuboA, tuboB); vec3 pointTubo = ClosestPointRaySegment(rayOrigin, rayDestination, tuboA, tuboB); return (distance(pointRay, pointTubo) <= tuboRadius);}[/source]

### #2JavierOltra

Posted 29 November 2012 - 06:47 AM

Finally found the problem, this:
[source lang="cpp"]bool IntersectTubo(vec3 rayOrigin, vec3 rayDestination, vec3 tuboA, vec3 tuboB, float tuboRadius){ vec3 pointRay = ClosestPointLineLine(rayOrigin, rayDestination, tuboA, tuboB); vec3 pointTubo = ClosestPointRaySegment(tuboA, tuboB, rayOrigin, rayDestination); return (distance(pointRay, pointTubo) <= tuboRadius);}[/source]

Should be:
[source lang="cpp"]bool IntersectTubo(vec3 rayOrigin, vec3 rayDestination, vec3 tuboA, vec3 tuboB, float tuboRadius){ vec3 pointRay = ClosestPointLineLine(rayOrigin, rayDestination, tuboA, tuboB); vec3 pointTubo = ClosestPointRaySegment(rayOrigin, rayDestination, tuboA, tuboB); return (distance(pointRay, pointTubo) <= tuboRadius);}[/source]

### #1JavierOltra

Posted 29 November 2012 - 06:46 AM

Finally found the problem, this:
[source lang="cpp"]bool IntersectTubo(vec3 rayOrigin, vec3 rayDestination, vec3 tuboA, vec3 tuboB, float tuboRadius){ vec3 pointRay = ClosestPointLineLine(rayOrigin, rayDestination, tuboA, tuboB); vec3 pointTubo = ClosestPointRaySegment(tuboA, tuboB, rayOrigin, rayDestination); return (distance(pointRay, pointTubo) <= tuboRadius);}[/source]

Should be:
[source lang="cpp"]bool IntersectTubo(vec3 rayOrigin, vec3 rayDestination, vec3 tuboA, vec3 tuboB, float tuboRadius){ vec3 pointRay = ClosestPointLineLine(rayOrigin, rayDestination, tuboA, tuboB); vec3 pointTubo = ClosestPointRaySegment(tuboA, tuboB, rayOrigin, rayDestination); return (distance(pointRay, pointTubo) <= tuboRadius);}[/source]

PARTNERS