public bool Contains (GraphNode node) {
Vector3 point = (Vector3)node.position;
//Debug.DrawRay (node.position,-Vector3.up*2,Color.magenta);
if (convex) {
if (_convexPoints == null) return false;
for (int i=0,j=_convexPoints.Length-1;i<_convexPoints.Length;j=i,i++) {
if (Polygon.Left (_convexPoints[i],_convexPoints[j],point)) return false;
}
} else {
if (_points == null) return false;
return Polygon.ContainsPoint (_points,point);
}
//Debug.DrawRay (node.position,Vector3.up*2,Color.blue);
return true;
}