Esempio n. 1
0
 public BoxParam(BoxParam param)
 {
     x = new PosClamp(param.x);
     y = new PosClamp(param.y);
     z = new PosClamp(param.z);
     points.AddRange(param.points);
     LargeSize = param.LargeSize;
     Ray       = param.Ray;
     Center    = new Vector3(param.Center.x, param.Center.y, param.Center.z);
 }
Esempio n. 2
0
        public float MinDistance(BoxParam other)
        {
            float distance = other.MinDistance(points[0]);

            for (int i = 1; i < points.Count; ++i)
            {
                distance = Mathf.Min(distance, other.MinDistance(points[i]));
            }

            return(distance);
        }
Esempio n. 3
0
 public bool IsAround(BoxParam other)
 {
     return(x.HasInContact(other.x) && y.HasInContact(other.y) && z.HasInContact(other.z));
 }
Esempio n. 4
0
 public bool HasContact(BoxParam other)
 {
     return(x.HasContact(other.x) && y.HasContact(other.y) && z.HasContact(other.z));
 }