public override float IntersectDistance(vec3 rayOrigin, vec3 rayDir) { float distance; GeometryMath.intersectRayPlane(rayOrigin, glm.normalize(rayDir), origin, normal, out distance); return(distance); }
public override float IntersectDistance(vec3 rayOrigin, vec3 rayDir) { float distance; GeometryMath.intersectRaySphere(rayOrigin, glm.normalize(rayDir), center, radius * radius, out distance); return(distance); }
public override bool Intersects(vec3 rayOrigin, vec3 rayDir) { float distance; return(GeometryMath.intersectRayPlane(rayOrigin, glm.normalize(rayDir), origin, normal, out distance)); }