private static Gizmo[] Draw(params Gizmo[] gizmos) { GizmoDrawer.Draw(gizmos); return(gizmos); }
/* * public static Gizmo DrawWireMesh(Mesh mesh, * int submeshIndex = 0, * Vector3 position = default, * Quaternion rotation = default, * Vector3 scale = default) * => Draw(new Gizmo(() => Gizmos.DrawWireMesh(mesh, submeshIndex, position, rotation, scale))); */ /* * public static Gizmo[] DrawArrow(Vector3 origin, Vector3 direction) * { * //=> Draw(new Gizmo()) * float headSize = 0.1f; * Vector3 end = origin + direction; * Vector3 arrowBase = origin + direction * (1 - headSize); * Vector3 left = Vector3.Cross(direction, Vector3.up).normalized; * Vector3 up = Vector3.Cross(left, direction).normalized; * * //Gizmos.DrawLine(origin, origin + direction); * // 4 Arrowhead sides * //Gizmos.DrawLine(end, arrowBase + left * headSize); * //Gizmos.DrawLine(end, arrowBase + up * headSize); * //Gizmos.DrawLine(end, arrowBase - left * headSize); * //Gizmos.DrawLine(end, arrowBase - up * headSize); * // 2 Arrowhed bases * //Gizmos.DrawLine(arrowBase + left * headSize, arrowBase - left * headSize); * //Gizmos.DrawLine(arrowBase + up * headSize, arrowBase - up * headSize); * * * //TODO: EDIT * return Draw * ( * new Gizmo(() => Gizmos.DrawLine(origin, origin + direction)), * new Gizmo(() => Gizmos.DrawLine(end, arrowBase + left * headSize)), * new Gizmo(() => Gizmos.DrawLine(end, arrowBase + up * headSize)), * new Gizmo(() => Gizmos.DrawLine(end, arrowBase - left * headSize)), * new Gizmo(() => Gizmos.DrawLine(end, arrowBase - up * headSize)), * new Gizmo(() => Gizmos.DrawLine(arrowBase + left * headSize, arrowBase - left * headSize)), * new Gizmo( () => Gizmos.DrawLine(arrowBase + up * headSize, arrowBase - up * headSize)) * ); * } */ private static Gizmo Draw(Gizmo gizmo) { GizmoDrawer.Draw(gizmo); return(gizmo); }