コード例 #1
0
ファイル: DrawGeometry.cs プロジェクト: wwcc19870805/DIFGIS
        public virtual IModelPoint GetModelPoint()
        {
            IModelPoint point = geoFactory.CreateGeometry(gviGeometryType.gviGeometryModelPoint, gviVertexAttribute.gviVertexAttributeZ) as IModelPoint;

            if (point == null)
            {
                return(null);
            }
            point.ModelName = this._modelname;
            point.SetCoords(this._x, this._y, this._z, double.NaN, -1);
            point.SelfScale(this._scaleX, this._scaleY, this._scaleZ);
            point.SelfRotate(1.0, 0.0, 0.0, this._rotateX);
            point.SelfRotate(0.0, 1.0, 0.0, this._rotateY);
            point.SelfRotate(0.0, 0.0, 1.0, this._rotateZ);
            return(point);
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: batuZ/Samples
        private void timer1_Tick(object sender, System.EventArgs e)
        {
            // 删除原有指针
            if (render_ZhiZhen != null)
            {
                this.axRenderControl1.ObjectManager.DeleteObject(render_ZhiZhen.Guid);
                render_ZhiZhen = null;
            }
            // 加载指针
            string modelNameZhiZhen = (strMediaPath + @"\osg\Dashboard\zhizhen.osg");

            fdepoint_ZhiZhen           = (IModelPoint)geoFactory.CreateGeometry(gviGeometryType.gviGeometryModelPoint, gviVertexAttribute.gviVertexAttributeZ);
            fdepoint_ZhiZhen.ModelName = modelNameZhiZhen;
            fdepoint_ZhiZhen.SetCoords(biaoPanX, biaoPanY, biaoPanZ + 0.01, 0, 0);
            fdepoint_ZhiZhen.SpatialCRS = dataset.SpatialReference;
            zhiZhenValue = random1.Next(0, 16);
            fdepoint_ZhiZhen.SelfRotate(0, 0, 1, -((zhiZhenValue % 16) * 3 * 3.14 / 32));
            render_ZhiZhen = this.axRenderControl1.ObjectManager.CreateRenderModelPoint(fdepoint_ZhiZhen, null, rootId);
            label.Text     = "当前的压力值是:" + zhiZhenValue.ToString();

            // 刷新弹出窗口
            if (clickFlag == 1)
            {
                if (dxform.IsDisposed)
                {
                    return;
                }
                else
                {
                    dxform.arcScaleComponent1.Value = zhiZhenValue;
                    dxform.Refresh();
                }
            }
        }