Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualAshaman73

Posted 19 July 2013 - 01:55 AM

How about using the step function ?

 

This checks if your testpoint is inside the limit.

vec4 result = step(limitA,testPoint) * step(testPoint,limitB);

This will check, if all 4 axis are inside.

bool is_inside = dot(result,result)==4;

More robust:

bool is_inside = dot(result,result)>3.5;

#1Ashaman73

Posted 19 July 2013 - 01:53 AM

How about using the step function ?

 

This checks if your testpoint is inside the limit.

vec4 result = step(limitA,testPoint) * step(testPoint,limitB);

This will check, if all axis are inside.

bool is_inside = dot(result,result)==3;

PARTNERS