コード例 #1
0
        public Axis FindShortestAxis(List <int> orig_list, DMesh dmesh)
        {
            Vector3 min, max;

            dmesh.GetVertBounds(orig_list, out min, out max);
            Vector3 diff = max - min;

            if (diff.X < diff.Y && diff.X < diff.Z)
            {
                return(Axis.X);
            }
            else if (diff.Z < diff.Y && diff.Z < diff.X)
            {
                return(Axis.Z);
            }
            else
            {
                return(Axis.Y);
            }
        }