using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework.Graphics;
using GraphiXNA.Cameras;
using Microsoft.Xna.Framework;

namespace GraphiXNA.Materials
{
    public class BasicMaterial : MaterialEffect
    {
        BasicEffect basicEffect = null;

        public BasicEffect BasicEffect
        {
            get { return basicEffect; }
        }

        public BasicMaterial(GraphicsDevice graphicsDevice)
            : base(graphicsDevice)
        {
            _Effect = (basicEffect = new BasicEffect(GraphicsDevice, ResourceManager.GetTextureMappingEffect(GraphicsDevice, false).EffectPool));
        }

        public sealed override void SetWorld(Camera camera, ref Matrix world)
        {
            BasicEffect.World = world;
            BasicEffect.View = camera._View;
            BasicEffect.Projection = camera._Projection;
        }
    }
}
