public override void DrawBox(ref Vector3 bbMin, ref Vector3 bbMax, ref Vector3 color)
 {
     UnityEngine.Bounds b = new UnityEngine.Bounds(bbMin.ToUnity(), UnityEngine.Vector3.zero);
     b.Encapsulate(bbMax.ToUnity());
     UnityEngine.Gizmos.color = new UnityEngine.Color(color.X, color.Y, color.Z);
     UnityEngine.Gizmos.DrawWireCube(b.center,b.size);
 }
Example #2
0
 /// <summary>
 /// ת��-> UnityEngine.Bounds
 /// </summary>
 /// <returns></returns>
 public UnityEngine.Bounds ToUnityAABB()
 {
     UnityEngine.Bounds bd = new UnityEngine.Bounds(
         new UnityEngine.Vector3(this.Center.x,this.Center.y,this.Center.z),
         new UnityEngine.Vector3(this.Size.x,this.Size.y,this.Size.z)
         );
     return bd;
 }