コード例 #1
0
 private static void PlayModeStateChangedHandler(PlayModeStateChange state)
 {
     if (state == PlayModeStateChange.ExitingPlayMode)
     {
         GraphLines.EditorExitingPlayMode();
     }
 }
コード例 #2
0
        public DataLine(GraphLines parent, Guid id, int index)
        {
            m_id    = id;
            m_index = index;

            m_unscaledData = new float[parent.m_pointsInLine];

            m_vector               = new VectorLine("DataLine" + index, new Vector3[parent.m_pointsInLine], parent.m_lineMaterial, parent.m_lineWidth, LineType.Continuous);
            m_vector.color         = parent.m_lineColors[index % parent.m_lineColors.Length];
            m_vector.drawTransform = parent.m_target;
            m_vector.Draw3DAuto();

            for (int x = 0; x < m_vector.points3.Count; x++)
            {
                m_unscaledData[x]   = float.NaN;
                m_vector.points3[x] = new Vector3(Mathf.Lerp(-5.0F, 5.0F, x / (float)m_vector.points3.Count), -((index + 1) * parent.m_lineDepthOffset + 0.05F), 0.0F);
            }
        }
コード例 #3
0
        public LegendLine(GraphLines parent, Guid id, int index, Color color)
        {
            Transform transform = parent.m_legendMesh.transform;
            Vector3   position  = transform.position;

            m_id                   = id;
            m_vector               = new VectorLine("LegendLine" + index, new Vector3[2], parent.m_lineMaterial, parent.m_lineWidth, LineType.Discrete);
            m_vector.color         = color;
            m_vector.drawTransform = transform;
            m_vector.Draw3DAuto();

            float spacing = parent.m_legendMesh.characterSize * 1.5F;

            // Position legend line relative to text descriptions
            Vector3 point1 = new Vector3(-2.0F, -(spacing / 2.0F + index * spacing), -position.z);
            Vector3 point2 = new Vector3(-0.5F, point1.y, point1.z);

            m_vector.points3[0] = point1;
            m_vector.points3[1] = point2;
        }
コード例 #4
0
ファイル: GraphLines.cs プロジェクト: rmc00/gsf
        public LegendLine(GraphLines parent, Guid id, int index, Color color)
        {
            Transform transform = parent.m_legendMesh.transform;
            Vector3 position = transform.position;

            m_id = id;
            m_vector = new VectorLine("LegendLine" + index, new Vector3[2], parent.m_lineMaterial, parent.m_lineWidth, LineType.Discrete);
            m_vector.color = color;
            m_vector.drawTransform = transform;
            m_vector.Draw3DAuto();

            float spacing = parent.m_legendMesh.characterSize * 1.5F;

            // Position legend line relative to text descriptions
            Vector3 point1 = new Vector3(-2.0F, -(spacing / 2.0F + index * spacing), -position.z);
            Vector3 point2 = new Vector3(-0.5F, point1.y, point1.z);

            m_vector.points3[0] = point1;
            m_vector.points3[1] = point2;
        }
コード例 #5
0
ファイル: GraphLines.cs プロジェクト: rmc00/gsf
        public DataLine(GraphLines parent, Guid id, int index)
        {
            m_id = id;
            m_index = index;

            m_unscaledData = new float[parent.m_pointsInLine];

            m_vector = new VectorLine("DataLine" + index, new Vector3[parent.m_pointsInLine], parent.m_lineMaterial, parent.m_lineWidth, LineType.Continuous);
            m_vector.color = parent.m_lineColors[index % parent.m_lineColors.Length];
            m_vector.drawTransform = parent.m_target;
            m_vector.Draw3DAuto();

            for (int x = 0; x < m_vector.points3.Count; x++)
            {
                m_unscaledData[x] = float.NaN;
                m_vector.points3[x] = new Vector3(Mathf.Lerp(-5.0F, 5.0F, x / (float)m_vector.points3.Count), -((index + 1) * parent.m_lineDepthOffset + 0.05F), 0.0F);
            }
        }