Beispiel #1
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(graphics.GraphicsDevice);
            drawWrapper = new DrawWrapper(spriteBatch, GraphicsDevice);
            world.AllAssets.LoadAllModels();

            world.DrawWrapper = drawWrapper;
            drawWrapper.Create();
            world.Create();
        }
Beispiel #2
0
 public virtual void DrawDebug(DrawWrapper Drawing, float[,] transform)
 {
     foreach (Triangle tri in triangles)
     {
         Drawing.DrawLine(vertices[tri.v0], vertices[tri.v1], 2, Color.DarkGray, transform);
         Drawing.DrawLine(vertices[tri.v0], vertices[tri.v2], 2, Color.DarkGray, transform);
         Drawing.DrawLine(vertices[tri.v1], vertices[tri.v2], 2, Color.DarkGray, transform);
     }
     foreach (Vector3 p in vertices)
     {
         Drawing.DrawPoint(p, 2, Color.Black, transform);
     }
 }
Beispiel #3
0
 public virtual void Draw(DrawWrapper Drawing, float[,] transform)
 {
     foreach (Triangle tri in triangles)
         Drawing.DrawTriangle(vertices[tri.v0], vertices[tri.v1], vertices[tri.v2],  tri.FrontFaceColor, tri.BackFaceColor, transform);
 }