/// <summary> /// function to get the max (abs) dimension of the given vertex v /// </summary> /// <param name="v"></param> /// <returns></returns> private int FindAbsMax(vec3 v) { v = v.Abs();// glm.abs(v); int max_dim = 0; float val = v.x; if (v.y > val) { val = v.y; max_dim = 1; } if (v.z > val) { val = v.z; max_dim = 2; } return(max_dim); }