示例#1
0
            public void Draw(Effect effect, GameTime gameTime)
            {
                if (_model == null)
                {
                    return;
                }

                Matrix world = Matrix.CreateTranslation(_position.X, _position.Y, _position.Z);

                world *= Matrix.CreateRotationZ(-Rotation.Z);
                world *= Matrix.CreateRotationX(-Rotation.X);
                world *= Matrix.CreateRotationY(Rotation.Y);
                world *= Matrix.CreateScale(_scale.X, _scale.Y, _scale.Z);
                world *= Matrix.CreateTranslation(-_model.realbbrange.X, _model.realbbrange.Y, -_model.realbbrange.Z);

                _model.Draw(world, effect, gameTime);
            }