**
让相机按路线飞行
**
一:技术原理:
在现实生活中,随着时间的进程,事物之间总保持着相对运动的状态。为了反映这种相对运动的状态,我们使用动画来让静态的场景“动”起来。
我们首先需要创建一个相机动画CameraTour,然后通过插入点的方式,构建出相机运动的轨迹,并确定每段路径移动的时间。针对已经生成的相机动画,我们可以使用播放、暂停、停止、导入导出等方法实现相应的功能。
二:创建相机动画:
1. .Net代码
//创建一个相机动画
private void createAnimate(){
AxRenderControl rendercontrol=getrenderControl();//获取插件
System.Guid rootId = new System.Guid();//获取GUID
//创建一个动画
ICameraTour tour = this.rendercontrol.ObjectManager.CreateCameraTour(rootId);//创建动画
//定义位置点
IVector3 position1 = new Vector3();//创建位置
IVector3 position2 = new Vector3();//创建位置
IVector3 position3 = new Vector3();//创建位置
position1.Set(15048.240912, 35534.520217, 110.061735);//根据信息确定位置
position2.Set(15562.502949, 35621.094456, 140.668562);//根