Example #1
0
 private void RotateListMyVertex(ref List <MyVertex> listMyVertex)
 {
     if (listMyVertex != null)
     {
         for (int i = 0; i < listMyVertex.Count; i++)
         {
             MyVertex mv = listMyVertex[i];
             mv.position     = Quaternion.Euler(0, 0, rotation) * listMyVertex[i].position;
             listMyVertex[i] = mv;
         }
     }
 }
Example #2
0
 public MyChip(List <MyVertex> edge, List <MyVertex> face, float rotation, Color color)
 {
     this.face     = face;
     this.edge     = edge;
     this.rotation = rotation;
     this.color    = color;
     for (int i = 0; i < edge.Count; i++)
     {
         MyVertex mv = edge[i];
         mv.color = color;
         edge[i]  = mv;
     }
     // RotateAll();
     ColorAll();
 }
Example #3
0
 public void AddVector3ToPos(Vector3 addV3)
 {
     if (edge != null)
     {
         for (int i = 0; i < edge.Count; i++)
         {
             MyVertex mv = edge[i];
             mv.position = mv.position + addV3;
             edge[i]     = mv;
         }
     }
     if (face != null)
     {
         for (int i = 0; i < face.Count; i++)
         {
             MyVertex mv = face[i];
             mv.position = mv.position + addV3;
             face[i]     = mv;
         }
     }
 }
Example #4
0
 public void ColorAll()
 {
     if (edge != null)
     {
         for (int i = 0; i < edge.Count; i++)
         {
             MyVertex mv = edge[i];
             mv.color = color;
             edge[i]  = mv;
         }
     }
     if (face != null)
     {
         for (int i = 0; i < face.Count; i++)
         {
             MyVertex mv = face[i];
             mv.color = color;
             face[i]  = mv;
         }
     }
 }