Esempio n. 1
0
        public static IAgVORefCrdnAngle DisplayAngle(string angleName, IAgStkObject stkObject, Color vectorColor)
        {
            IAgAircraft _aircraft = stkObject as IAgAircraft;
            IAgCrdn     _angleVGT = stkObject.Vgt.Angles[angleName] as IAgCrdn;

            IAgVORefCrdnCollection refCrdns = GetRefCrdns(stkObject); //_aircraft.VO.Vector.RefCrdns;

            List <string> displayVectors = new List <string>();

            foreach (IAgVORefCrdn item in refCrdns)
            {
                displayVectors.Add(item.Name);
            }

            IAgVORefCrdnAngle _angleVO;

            if (displayVectors.Contains(_angleVGT.QualifiedPath))
            {
                _angleVO = refCrdns.GetCrdnByName(
                    AgEGeometricElemType.eAngleElem, _angleVGT.QualifiedPath) as IAgVORefCrdnAngle;
            }
            else
            {
                _angleVO = refCrdns.Add(
                    AgEGeometricElemType.eAngleElem, _angleVGT.QualifiedPath) as IAgVORefCrdnAngle;
            }

            _angleVO.AngleValueVisible = true;
            _angleVO.Color             = vectorColor;
            _angleVO.LabelVisible      = true;

            return(_angleVO);
        }
Esempio n. 2
0
        public static void VectorChangePoint(string vectorName, string OriginPointName, IAgStkObject stkObject)
        {
            string VectorDisplayOrigin = OriginPointName;

            //IAgAircraft _aircraft = stkObject as IAgAircraft;
            IAgCrdn vector = stkObject.Vgt.Vectors[vectorName] as IAgCrdn;
            IAgCrdn point  = stkObject.Vgt.Points[OriginPointName] as IAgCrdn;
            IAgVORefCrdnCollection refCrdns = GetRefCrdns(stkObject);
            IAgVORefCrdnVector     vectorVO = refCrdns.GetCrdnByName(AgEGeometricElemType.eVectorElem, vector.QualifiedPath) as IAgVORefCrdnVector;

            vectorVO.DrawAtPoint = true;
            vectorVO.Point       = point.QualifiedPath;
        }
Esempio n. 3
0
        public static IAgVORefCrdnVector DisplayVector(string vectorName, IAgStkObject stkObject, Color vectorColor)
        {
            if (!stkObject.Vgt.Vectors.Contains(vectorName))
            {
                return(null);
            }

            IAgCrdn _vectorVGT = stkObject.Vgt.Vectors[vectorName] as IAgCrdn;

            IAgVORefCrdnCollection refCrdns = GetRefCrdns(stkObject);

            List <string> displayVectors = new List <string>();

            foreach (IAgVORefCrdn item in refCrdns)
            {
                displayVectors.Add(item.Name);
            }

            IAgVORefCrdnVector _vectorVO;

            if (displayVectors.Contains(_vectorVGT.QualifiedPath))
            {
                _vectorVO = refCrdns.GetCrdnByName(AgEGeometricElemType.eVectorElem, _vectorVGT.QualifiedPath) as IAgVORefCrdnVector;
            }
            else
            {
                _vectorVO = refCrdns.Add(AgEGeometricElemType.eVectorElem, _vectorVGT.QualifiedPath) as IAgVORefCrdnVector;
            }

            _vectorVO.Visible          = true;
            _vectorVO.Color            = vectorColor;
            _vectorVO.ArrowType        = AgEArrowType.e3D;
            _vectorVO.LabelVisible     = true;
            _vectorVO.MagnitudeVisible = true;
            //_vectorVO.MagnitudeUnitAbrv = "nm";
            return(_vectorVO);
        }