예제 #1
0
파일: HTDraw.cs 프로젝트: wuyanna/HyperTree
        internal void Translate(HTCoordE zs, HTCoordE ze)
        {
            HTCoordE zo = new HTCoordE(drawRoot.GetOldCoordinates());

            zo.X = -zo.X;
            zo.Y = -zo.Y;
            HTCoordE zs2 = new HTCoordE(zs);

            zs2.Translate(zo);

            HTCoordE t  = new HTCoordE();
            double   de = ze.D2();
            double   ds = zs2.D2();
            double   dd = 1.0 - de * ds;

            t.X = (ze.X * (1.0 - ds) - zs2.X * (1.0 - de)) / dd;
            t.Y = (ze.Y * (1.0 - ds) - zs2.Y * (1.0 - de)) / dd;

            if (t.IsValid())
            {
                HTTransformation to = new HTTransformation();
                to.Composition(zo, t);

                drawRoot.Transform(to);
                view.Repaint();
            }
        }
예제 #2
0
        override internal void Transform(HTTransformation t)
        {
            base.Transform(t);

            HTDrawNode child = null;

            for (IEnumerator i = Children(); i.MoveNext();)
            {
                child = (HTDrawNode)i.Current;
                child.Transform(t);
                HTGeodesic geod = (HTGeodesic)geodesics[child];
                if (geod != null)
                {
                    geod.Rebuild();
                }
            }
        }
예제 #3
0
        internal void Transform(HTTransformation t)
        {
            HTCoordE z = new HTCoordE(this);

            Multiply(t.O);
            x += t.P.x;
            y += t.P.y;

            HTCoordE d = new HTCoordE(t.P);

            d.y = -d.y;
            d.Multiply(z);
            d.Multiply(t.O);
            d.x += 1;

            Divide(d);
        }
예제 #4
0
 internal virtual void Transform(HTTransformation t)
 {
     ze.Copy(oldZe);
     ze.Transform(t);
 }
예제 #5
0
        internal override void Transform(HTTransformation t)
        {
            base.Transform(t);

            HTDrawNode child = null;
            for (IEnumerator i = Children(); i.MoveNext(); )
            {
                child = (HTDrawNode)i.Current;
                child.Transform(t);
                HTGeodesic geod = (HTGeodesic)geodesics[child];
                if (geod != null)
                {
                    geod.Rebuild();
                }
            }
        }
예제 #6
0
파일: HTDraw.cs 프로젝트: wuyanna/HyperTree
        internal void Translate(HTCoordE zs, HTCoordE ze)
        {
            HTCoordE zo = new HTCoordE(drawRoot.GetOldCoordinates());
            zo.X = -zo.X;
            zo.Y = -zo.Y;
            HTCoordE zs2 = new HTCoordE(zs);
            zs2.Translate(zo);

            HTCoordE t = new HTCoordE();
            double de = ze.D2();
            double ds = zs2.D2();
            double dd = 1.0 - de * ds;
            t.X = (ze.X * (1.0 - ds) - zs2.X * (1.0 - de)) / dd;
            t.Y = (ze.Y * (1.0 - ds) - zs2.Y * (1.0 - de)) / dd;

            if (t.IsValid())
            {
                HTTransformation to = new HTTransformation();
                to.Composition(zo, t);

                drawRoot.Transform(to);
                view.Repaint();
            }
        }
예제 #7
0
 internal virtual void Transform(HTTransformation t)
 {
     ze.Copy(oldZe);
     ze.Transform(t);
 }
예제 #8
0
        internal void Transform(HTTransformation t)
        {
            HTCoordE z = new HTCoordE(this);
            Multiply(t.O);
            x += t.P.x;
            y += t.P.y;

            HTCoordE d = new HTCoordE(t.P);
            d.y = -d.y;
            d.Multiply(z);
            d.Multiply(t.O);
            d.x += 1;

            Divide(d);
        }