Made rcMarkWalkableTriangles a template function