예제 #1
0
파일: Game3d.cs 프로젝트: rubna/3dEngine
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(graphics.GraphicsDevice);
            drawWrapper = new DrawWrapper(spriteBatch, GraphicsDevice);
            world.AllAssets.LoadAllModels();

            world.DrawWrapper = drawWrapper;
            drawWrapper.Create();
            world.Create();
        }
예제 #2
0
파일: Mesh.cs 프로젝트: rubna/3dEngine
 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);
     }
 }
예제 #3
0
파일: Mesh.cs 프로젝트: rubna/3dEngine
 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);
 }