Пример #1
0
 public override void DrawBegin(Graphics3D graphics)
 {
     Face[] faces = Faces;
     if (Vector3D.DotProduct(faces[0].Normal, graphics.ViewDirection) >= 0.0)
     {
         for (int i = 0; i < 4; ++i)
         {
             graphics.AddFaceBackground(faces[i]);
         }
     }
     if (Vector3D.DotProduct(faces[4].Normal, graphics.ViewDirection) >= 0.0)
     {
         for (int i = 4; i < 8; ++i)
         {
             graphics.AddFaceBackground(faces[i]);
         }
     }
 }
Пример #2
0
 public override void DrawBegin(Graphics3D graphics)
 {
     Face[] faces = Faces;
     if (Vector3D.DotProduct(faces[0].Normal, graphics.ViewDirection) >= 0.0)
     {
         for (int i = 0; i < 4; ++i)
             graphics.AddFaceBackground(faces[i]);
     }
     if (Vector3D.DotProduct(faces[4].Normal, graphics.ViewDirection) >= 0.0)
     {
         for (int i = 4; i < 8; ++i)
             graphics.AddFaceBackground(faces[i]);
     }
 }