
本站地址:http://www.bajiao123.com

托管的 Direct3D之 使用 Frame Hierarchy 创建动画(翻译)
protected float roll = 0.0F; public Tank(string xFilePath, Device device) : base(xFilePath, device) { } public override void Initialize() { base.Initialize(); this.SetupCustomTransform += new EventHandler(this.Tank_CalcCustomTransform); } public void Tank_CalcCustomTransform(object sender, EventArgs e) { this.GetFrame("Body").CustomTransform = Matrix.RotationYawPitchRoll(this.bearing, this.pitch, this.roll)* //Matrix.RotationY(this.bearing) * Matrix.Translation(this.position); this.GetFrame("Turret").CustomTransform = Matrix.RotationY(this.turretAngle); } public float TurretAngle { get { return this.turretAngle; } set { this.turretAngle = value; } } public float Bearing { get { return this.bearing; } set<< 上一页 [21] [22] [23] [24] [25] 下一页
本站地址:http://www.bajiao123.com

