Example #1
0
        public override void SetParameters(IHMRenderable renderable)
        {
            Matrix world = HMCameraManager.ActiveCamera.World * Matrix.CreateScale(renderable.Scaling) *
                           Matrix.CreateFromQuaternion(renderable.Rotation) *
                           Matrix.CreateTranslation(renderable.Position);

            if (null != Effect.Parameters["World"]) {
                Effect.Parameters["World"].SetValue(world);
            }

            if (null != Effect.Parameters["View"]) {
                Effect.Parameters["View"].SetValue(HMCameraManager.ActiveCamera.View);
            }

            if (null != Effect.Parameters["Projection"]) {
                Effect.Parameters["Projection"].SetValue(HMCameraManager.ActiveCamera.Projection);
            }
        }
Example #2
0
 public abstract void SetParameters(IHMRenderable renderable);
 public override void SetParameters(IHMRenderable renderable)
 {
 }