⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 baseearth.cs

📁 一个Wince的小程序
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;

namespace WindowsFormsApplication1
{
    class BaseEarth
    {
        private float xloc = 0.0f;

        public float Xloc
        {
            get { return xloc; }
            set { xloc = value; }
        }
        private float yloc = 0.0f;

        public float Yloc
        {
            get { return yloc; }
            set { yloc = value; }
        }
        private float zloc = 0.0f;

        public float Zloc
        {
            get { return zloc; }
            set { zloc = value; }
        }
        private float xrot = 0.0f;

        public float Xrot
        {
            get { return xrot; }
            set { xrot = value; }
        }
        private float yrot = 0.0f;

        public float Yrot
        {
            get { return yrot; }
            set { yrot = value; }
        }
        private float zrot = 0.0f;

        public float Zrot
        {
            get { return zrot; }
            set { zrot = value; }
        }
        private float xscale = 1.0f;

        public float Xscale
        {
            get { return xscale; }
            set { xscale = value; }
        }
        private float yscale = 1.0f;

        public float Yscale
        {
            get { return yscale; }
            set { yscale = value; }
        }
        private float zscale = 1.0f;

        public float Zscale
        {
            get { return zscale; }
            set { zscale = value; }
        }
        public virtual void Render()
        {
            objdevice.MultiplyTransform(TransformType.World, Matrix.Translation(xloc, yloc, zloc));
            objdevice.MultiplyTransform(TransformType.World, Matrix.RotationAxis(new Vector3(1.0f, 0.0f, 0.0f), xrot));
            objdevice.MultiplyTransform(TransformType.World, Matrix.RotationAxis(new Vector3(0.0f, 1.0f, 0.0f), yrot));
            objdevice.MultiplyTransform(TransformType.World, Matrix.RotationAxis(new Vector3(0.0f, 0.0f, 1.0f), zrot));
            objdevice.MultiplyTransform(TransformType.World, Matrix.Scaling(xscale, yscale, zscale));
            return;
        }

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -