Пример #1
0
        public void HighlightTriangle(int index)
        {
            List <Vector3> list = new List <Vector3>();

            GDMesh.Face face = this.Controller.GDMesh.Faces[index];
            foreach (GDMesh.Vertex vertex in face.Vertices)
            {
                list.Add(this.Controller.referencedGO.transform.TransformPoint(vertex.Traits.position));
            }
            GLDrawUtility.DrawTriangle(Color.green, Color.green, Color.green, list.ToArray());
        }
Пример #2
0
 public void HighlightEdge(int index)
 {
     if (index != -1)
     {
         List <Vector3> list = new List <Vector3>();
         GDMesh.Edge    edge = this.Controller.GDMesh.Edges[index];
         list.Add(this.Controller.referencedGO.transform.TransformPoint(edge.Vertex0.Traits.position));
         list.Add(this.Controller.referencedGO.transform.TransformPoint(edge.Vertex1.Traits.position));
         GLDrawUtility.DrawLine(Color.green, Color.green, Color.green, list.ToArray(), false);
     }
 }
Пример #3
0
        public void DrawEdges()
        {
            List <Vector3> list = new List <Vector3>();

            foreach (int num in this.Controller.selection.selectedEdges)
            {
                GDMesh.Edge edge = this.Controller.GDMesh.Edges[num];
                list.Add(this.Controller.referencedGO.transform.TransformPoint(edge.Vertex0.Traits.position));
                list.Add(this.Controller.referencedGO.transform.TransformPoint(edge.Vertex1.Traits.position));
            }
            GLDrawUtility.DrawLine(Color.red, Color.red, Color.red, list.ToArray(), false);
        }
Пример #4
0
        public void DrawTriangles()
        {
            List <Vector3> list = new List <Vector3>();

            foreach (int num in this.Controller.selection.selectedTriangles)
            {
                int         num2 = 0;
                GDMesh.Face face = this.Controller.GDMesh.Faces[num];
                foreach (GDMesh.Vertex vertex in face.Vertices)
                {
                    list.Add(this.Controller.referencedGO.transform.TransformPoint(vertex.Traits.position));
                    num2++;
                }
            }
            GLDrawUtility.DrawTriangle(Color.red, Color.red, Color.red, list.ToArray());
        }
Пример #5
0
 private void OnPostRender()
 {
     GLDrawUtility.DrawGrid(this.gridColor, this.gridColor, this.gridColor, this.target, null);
 }