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]); } } }
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]); } }