Ejemplo n.º 1
0
        private void ToolStripMenuItemCreateComplexParticleEffect_Click(object sender, EventArgs e)
        {
            IComplexParticleEffect p = this.axRenderControl1.ObjectManager.CreateComplexParticleEffect(gviComplexParticleEffectType.gviComplexParticleEffectFire_3, selectedId);

            p.ScalingFactor = 5;
            p.Name          = "粒子火Fire_0";

            IPoint pos = new GeometryFactory().CreatePoint(gviVertexAttribute.gviVertexAttributeZ) as IPoint;

            pos.SetCoords(fireX, fireY, fireZ, 0, 0);
            p.Position = pos;
            this.axRenderControl1.Camera.FlyToObject(p.Guid, gviActionCode.gviActionFlyTo);

            TreeNode node = new TreeNode("粒子火Fire_0", 1, 1);

            node.Tag     = p.Guid;
            node.Checked = true;
            selectedNode.Nodes.Add(node);
            this.treeView1.UpdateView();

            //this.axRenderControl1.InteractMode = gviInteractMode.gviInteractSelect;
            //this.axRenderControl1.MouseSelectObjectMask = gviMouseSelectObjectMask.gviSelectParticleEffect;
            //this.axRenderControl1.MouseSelectMode = gviMouseSelectMode.gviMouseSelectClick;

            //this.axRenderControl1.RcMouseClickSelect += new Gvitech.CityMaker.Controls._IRenderControlEvents_RcMouseClickSelectEventHandler(axRenderControl1_RcMouseClickSelect);

            if (motionPath != null)
            {
                IMotionable m = p as IMotionable;
                position.Set(0, 0, 0);
                m.Bind(motionPath, position, 0, 45, 90);
                motionPath.Play();
                this.axRenderControl1.Camera.FlyToObject(p.Guid, gviActionCode.gviActionFollowBehindAndAbove);
            }
        }
Ejemplo n.º 2
0
 private void btnPlay_Click(object sender, EventArgs e)
 {
     if (motionPath != null)
     {
         motionPath.Play();
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 播放
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnPlay_Click(object sender, EventArgs e)
        {
            if (motionPath != null)
            {
                CommonUnity.RenderHelper.Camera.FlyTime = 0;
                //position.SetCoords(15013.714200397741, 35620.582091043034, 56.87099679938563, 0, 0);
                //angle.Set(60.75, -26.97, 0);
                //CommonUnity.RenderHelper.Camera.SetCamera2(position, angle, gviSetCameraFlags.gviSetCameraNoFlags);

                IVector3 p = new Vector3();
                p.Set(15013.714200397741, 35620.582091043034, 56.87099679938563);
                angle.Set(60.75, -26.97, 0);
                CommonUnity.RenderHelper.Camera.SetCamera(p, angle, gviSetCameraFlags.gviSetCameraNoFlags);
                motionPath.Play();
            }
        }