public virtual VsElement Clip3DF(Clipper clip)
        {
            VsString ret = new VsString(this);

            if (ret.pos != null)
            {
                ret.pos = clip.Vs_point_clip_3df(ret.pos);
            }
            return(ret);
        }
        public virtual VsElement Transform(Matrix44 mat)
        {
            VsString ret = new VsString(this);

            if (ret.pos != null)
            {
                ret.pos = ret.pos.MultMat(mat);
            }
            return(ret);
        }
        public virtual VsElement Project(Projector proj)
        {
            VsString ret = new VsString(this);

            if (ret.pos != null)
            {
                ret.pos = proj.Project(ret.pos);
            }
            return(ret);
        }
 public VsString(VsString s)
 {
     type = "VsString";
     col  = s.col;
     fon  = s.fon;
     data = s.data;
     if (s.pos != null)
     {
         pos = new Vector3D(s.pos);
     }
     else
     {
         pos = null;
     }
 }
Beispiel #5
0
        public static VsElement CreateElement(VsElement elem)
        {
            VsElement ret  = null;
            String    type = elem.ElemType();

            if (type.Equals("VsPoint"))
            {
                ret = new VsPoint((VsPoint)elem);
            }
            else if (type.Equals("VsPolygon"))
            {
                ret = new VsPolygon((VsPolygon)elem);
            }
            else if (type.Equals("VsPolygon2"))
            {
                ret = new VsPolygon2((VsPolygon2)elem);
            }
            else if (type.Equals("VsPolygon3"))
            {
                ret = new VsPolygon3((VsPolygon3)elem);
            }
            else if (type.Equals("VsPolygon4"))
            {
                ret = new VsPolygon4((VsPolygon4)elem);
            }
            else if (type.Equals("VsSegment"))
            {
                ret = new VsSegment((VsSegment)elem);
            }
            else if (type.Equals("VsString"))
            {
                ret = new VsString((VsString)elem);
            }
            else if (type.Equals("VsString2"))
            {
                ret = new VsString2((VsString2)elem);
            }
            else if (type.Equals("VsObject"))
            {
                ret = new VsObject((VsObject)elem);
            }

            return(ret);
        }
        public virtual VsElement Clip2D(Clipper clip)
        {
            VsString ret = new VsString(this);

            return(ret);
        }