Exemple #1
0
        //--------------------------------------------------------------------------------------------------

        public override void Update()
        {
            bool isValid = true;

            if (_GeomLine == null)
            {
                isValid = _P1.Distance(_P2) > Double.Epsilon;
            }
            if (!isValid)
            {
                Remove();
                return;
            }

            if (_AisLine == null)
            {
                if (!_EnsureAisObject())
                {
                    return;
                }
            }
            else
            {
                if (_GeomLine != null)
                {
                    _AisLine.SetLine(_GeomLine);
                }
                else
                {
                    _AisLine.SetPoints(_P1, _P2);
                }
                AisContext.RecomputePrsOnly(_AisLine, false);
            }
        }
Exemple #2
0
        //--------------------------------------------------------------------------------------------------

        void _Update()
        {
            if (_AisLine == null)
            {
                if (!_EnsureAisObject())
                {
                    return;
                }
            }
            else
            {
                if (_GeomLine != null)
                {
                    _AisLine.SetLine(_GeomLine);
                }
                else
                {
                    _AisLine.SetPoints(_P1, _P2);
                }
                AisContext.RecomputePrsOnly(_AisLine, false);
            }
        }