示例#1
0
        public virtual VsElement Clip3DF(Clipper clip)
        {
            VsPoint ret = new VsPoint(this);

            if (ret.pos != null)
            {
                ret.pos = clip.Vs_point_clip_3df(ret.pos);
            }
            return(ret);
        }
示例#2
0
        public virtual VsElement Transform(Matrix44 mat)
        {
            VsPoint ret = new VsPoint(this);

            if (ret.pos != null)
            {
                ret.pos = ret.pos.MultMat(mat);
            }
            return(ret);
        }
示例#3
0
        public virtual VsElement Project(Projector proj)
        {
            VsPoint ret = new VsPoint(this);

            if (ret.pos != null)
            {
                ret.pos = proj.Project(ret.pos);
            }
            return(ret);
        }
示例#4
0
 public VsPoint(VsPoint p)
 {
     type = "VsPoint";
     col  = p.col;
     if (p.pos != null)
     {
         pos = new Vector3D(p.pos);
     }
     else
     {
         pos = null;
     }
 }
示例#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);
        }