コード例 #1
0
        protected override bool OnQualify(SelectContext selectCtx, Matrix44 parentTrans)
        {
            foreach (DisplayItem item in m_ItemList)
                item.Qualify(selectCtx, GetChildrenTransformation(parentTrans));

            return false;
        }
コード例 #2
0
ファイル: DisplayItem.cs プロジェクト: JeffreyZksun/opendraw
        // DP: Template Method
        public void Qualify(SelectContext selectCtx, Matrix44 parentTrans)
        {
            //if (null == selectCtx || selectCtx.IsHitted) return;
            if (null == selectCtx) return;

            if(OnQualify(selectCtx, parentTrans))
            {

            }
        }
コード例 #3
0
        protected override bool OnQualify(SelectContext selectCtx, Matrix44 parentTrans)
        {
            if (selectCtx == null) return false;

            GePoint worldPoint = MathUtil.GetTransformedPoint(m_Point, parentTrans);

            double dDiff = worldPoint.DistanceTo(selectCtx.WorldPoint);

            if (dDiff < selectCtx.SelectTolerance)
            {
                selectCtx.AddItem(dDiff, this);
                return true;
            }

            return false;
        }
コード例 #4
0
        protected override bool OnQualify(SelectContext selectCtx, Matrix44 parentTrans)
        {
            if (selectCtx == null) return false;

            GePoint worldCenterPoint = MathUtil.GetTransformedPoint(m_CenterPoint, parentTrans);

            double dist = worldCenterPoint.DistanceTo(selectCtx.WorldPoint);

            // Get the plus distance
            double dDiff = dist - m_dRadius;
            if (dDiff < 0) dDiff = -dDiff;

            if (dDiff < selectCtx.SelectTolerance)
            {
                selectCtx.AddItem(dDiff, this);
                return true;
            }

            return false;
        }
コード例 #5
0
        protected override bool OnQualify(SelectContext selectCtx, Matrix44 parentTrans)
        {
            if (selectCtx == null) return false;

            GeRectangle Rec = Range;

            GePoint worldPosition = MathUtil.GetTransformedPoint(m_Position, parentTrans);

            Rec.MoveTo(worldPosition);

            if (selectCtx.WorldPoint.X > (Rec.MinPoint.X - selectCtx.SelectTolerance)
                && selectCtx.WorldPoint.X < (Rec.MaxPoint.X + selectCtx.SelectTolerance)
                && selectCtx.WorldPoint.Y > (Rec.MinPoint.Y - selectCtx.SelectTolerance)
                && selectCtx.WorldPoint.Y < (Rec.MaxPoint.Y + selectCtx.SelectTolerance))
            {
                selectCtx.AddItem(0, this);
                return true;
            }

            return false;
        }
コード例 #6
0
ファイル: DisplayItem.cs プロジェクト: JeffreyZksun/opendraw
 protected abstract bool OnQualify(SelectContext selectCtx, Matrix44 parentTrans);