git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9553 75d07b2b-3a1a-0410-a2c5-0572b91ccdca3.0
parent
9276987aac
commit
28926b8383
@ -0,0 +1,10 @@ |
||||
#ifdef ENABLE_AREA |
||||
bool isOverExtent(vec3 position,vec3 center,float radius){ |
||||
vec2 dist = position.xz-center.xz; |
||||
#ifdef SQUARE_AREA |
||||
return dist.x*dist.x >radius || dist.y*dist.y >radius; |
||||
#else |
||||
return dot(dist,dist)>radius; |
||||
#endif |
||||
} |
||||
#endif |
Loading…
Reference in new issue