public override void Draw(GameTime gameTime, Camera3D camera) { EffectParameters.Effect.View = camera.View; EffectParameters.Effect.Projection = camera.Projection; EffectParameters.Effect.DiffuseColor = EffectParameters.DiffuseColor.ToVector3(); EffectParameters.Effect.Alpha = EffectParameters.Alpha; EffectParameters.Effect.CurrentTechnique.Passes[0].Apply(); //Not all models NEED a texture. Does a semi-transparent window need a texture? if (EffectParameters.Texture != null) { EffectParameters.Effect.Texture = EffectParameters.Texture; } foreach (ModelMesh mesh in model.Meshes) { foreach (ModelMeshPart part in mesh.MeshParts) { part.Effect = EffectParameters.Effect; } EffectParameters.Effect.World = BoneTransforms[mesh.ParentBone.Index] * this.GetWorldMatrix(); // Transform3D.World; mesh.Draw(); } }
public override void Draw(GameTime gameTime, Camera3D camera) { EffectParameters.Draw(Transform3D.World, camera); IVertexData.Draw(gameTime, EffectParameters.Effect); }
public virtual void Draw(GameTime gameTime, Camera3D camera, GraphicsDevice graphicsDevice) { //does nothing - see child classes }
public virtual void Draw(GameTime gameTime, Camera3D camera) { //does nothing - see child classes }
public override void Draw(GameTime gameTime, Camera3D camera, GraphicsDevice graphicsDevice) { EffectParameters.Draw(Transform3D.World, camera); IVertexData.Draw(gameTime, EffectParameters.Effect, graphicsDevice); }