powerpoint presentationdownload.microsoft.com/documents/hk/technet/techdays2012... ·...

Post on 13-Mar-2020

3 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

BasicEffect

DualTextureEffect

AlphaTestEffect

SkinnedEffect

EnvironmentMapEffect

Matrix[] transforms = new Matrix[mymodel.Bones.Count]; mymodel.CopyAbsoluteBoneTransformsTo(transforms); time = -(float)gameTime.TotalGameTime.TotalSeconds * 70; foreach (ModelMesh mesh in mymodel.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.EnableDefaultLighting(); effect.World = transforms[mesh.ParentBone.Index] * Matrix.CreateTranslation(time + 1000.0f, 20.0f, 20.0f);

effect.View = Matrix.CreateLookAt(Vector3.Zero, Vector3.UnitX, Vector3.Forward);

effect.Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(89.0f), 800.0f / 600.0f, 10.0f, 10000.0f);

}

mesh.Draw();}

Feedback

http://uditha.wordpress.com/

udithamail@yahoo.com

top related