Exemple #1
0
    private void DrawSphereLongSegments(Vector3 center)
    {
        int longSegments = (int)Mathf.Floor(4.0f + 8.0f * (1.0f + Mathf.Sin(m_phase)));

        Color color = (m_style == DebugUtil.Style.Wireframe ? m_wireframeColor : new Color(0.8f, 0.5f, 0.0f));

        DebugUtil.DrawSphere(center + m_basePos, m_baseRotQuat, 1.0f, 8, longSegments, color, true, m_style);
    }
 private void Draw(float[] value)
 {
     for (int x = 0; x < value.GetLength(0); ++x)
     {
         Vector3 p = ComputePoint(x);
         Color   c = ComputeColor(p, ComputePoint(0), ComputePoint(m_gridExtent - 1), 0.8f);
         DebugUtil.DrawSphere(p, m_elementSize * value[x], 2, 4, c, true, DebugUtil.Style.FlatShaded);
     }
 }
 private void Draw(float[,,] value)
 {
     for (int z = 0; z < value.GetLength(2); ++z)
     {
         for (int y = 0; y < value.GetLength(1); ++y)
         {
             for (int x = 0; x < value.GetLength(0); ++x)
             {
                 Vector3 p = ComputePoint(x, y, z);
                 Color   c = ComputeColor(p, ComputePoint(0, 0, m_gridExtent - 1), ComputePoint(m_gridExtent - 1, m_gridExtent - 1, 0), 0.1f);
                 DebugUtil.DrawSphere(p, m_elementSize * value[z, y, x], 2, 4, c, true, DebugUtil.Style.FlatShaded);
             }
         }
     }
 }
 private void Draw(Vector2[] input, float[] value)
 {
     for (int i = 0; i < input.Length; ++i)
     {
         float farMult =
             (input.Length == m_gridExtent)
       ? 0.8f
       : 0.6f;
         Vector3 p =
             (input.Length == m_gridExtent)
       ? ComputePoint((int)input[i].x)
       : ComputePoint((int)input[i].x, (int)input[i].y);
         Color c = ComputeColor(p, ComputePoint(0, 0, m_gridExtent - 1), ComputePoint(m_gridExtent - 1, m_gridExtent - 1, 0), farMult);
         DebugUtil.DrawSphere(p, m_elementSize * value[i], 2, 4, c, true, DebugUtil.Style.FlatShaded);
     }
 }
    private void DrawSphereLongSegments(Vector3 center)
    {
        int longSegments = (int)Mathf.Floor(4.0f + 8.0f * (1.0f + Mathf.Sin(m_phase)));

        DebugUtil.DrawSphere(center + m_basePos, m_baseRotQuat, 1.0f, 8, longSegments, Color.white, false);
    }