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);
 }
 public override void DrawArc(ref Vector3 center, ref Vector3 normal, ref Vector3 axis, float radiusA, float radiusB, float minAngle, float maxAngle,
     ref Vector3 color, bool drawSect, float stepDegrees)
 {
     UnityEngine.Color col = new UnityEngine.Color(color.X, color.Y, color.Z);
     BUtility.DebugDrawArc(center.ToUnity(), normal.ToUnity(), axis.ToUnity(), radiusA, radiusB, minAngle, maxAngle, col, drawSect, stepDegrees);
 }
 public override void DrawTriangle(ref Vector3 v0, ref Vector3 v1, ref Vector3 v2, ref Vector3 color, float alpha)
 {
     UnityEngine.Gizmos.color = new UnityEngine.Color(color.X, color.Y, color.Z);
     UnityEngine.Gizmos.DrawLine(v0.ToUnity(), v1.ToUnity());
     UnityEngine.Gizmos.DrawLine(v1.ToUnity(), v2.ToUnity());
     UnityEngine.Gizmos.DrawLine(v2.ToUnity(), v0.ToUnity());
 }
 public override void DrawSphere(ref Vector3 p, float radius, ref Vector3 color)
 {
     UnityEngine.Color c = new UnityEngine.Color(color.X, color.Y, color.Z);
     BUtility.DebugDrawSphere(p.ToUnity(),UnityEngine.Quaternion.identity,UnityEngine.Vector3.one, UnityEngine.Vector3.one * radius, c);
 }
 public override void DrawPlane(ref Vector3 planeNormal, float planeConst, ref Matrix trans, ref Vector3 color)
 {
     UnityEngine.Vector3 pos = BSExtensionMethods2.ExtractTranslationFromMatrix(ref trans);
     UnityEngine.Quaternion rot = BSExtensionMethods2.ExtractRotationFromMatrix(ref trans);
     UnityEngine.Vector3 scale = BSExtensionMethods2.ExtractScaleFromMatrix(ref trans);
     UnityEngine.Color c = new UnityEngine.Color(color.X, color.Y, color.Z);
     BUtility.DebugDrawPlane(pos, rot, scale, planeNormal.ToUnity(), planeConst, c);
 }
 public override void DrawLine(ref Vector3 from, ref Vector3 to, ref Vector3 fromColor, ref Vector3 toColor)
 {
     UnityEngine.Gizmos.color = new UnityEngine.Color(fromColor.X, fromColor.Y, fromColor.Z);
     UnityEngine.Gizmos.DrawLine(from.ToUnity(), to.ToUnity());
 }
 public void SetEyeTarget(Vector3 eye, Vector3 targ)
 {
     UnityEngine.Transform t = UnityEngine.Camera.main.transform;
     t.position = eye.ToUnity();
     t.rotation = UnityEngine.Quaternion.LookRotation((targ - eye).ToUnity().normalized, UnityEngine.Vector3.up);
 }