Example #1
0
        public double getDist(sg_Vector3 pt)
        {
            sg_Vector3        v    = new sg_Vector3(pt);
            sg_Transformation m    = new sg_Transformation(_v, certenPt);
            sg_Vector3        newv = m.inverse(v);

            return(Math.Abs(newv.z));
        }
Example #2
0
        public bool get2DPoint(sg_Vector3 pt, out sg_Vector3 retPt)
        {
            sg_Vector3 v = new sg_Vector3(pt.x, pt.y, pt.z);

            retPt = new sg_Vector3(0, 0, 0);
            sg_Transformation m    = new sg_Transformation(_v, certenPt);
            sg_Vector3        newv = m.inverse(v);

            if (!sg_math.isZero(newv.z))
            {
                return(false);
            }
            retPt = new sg_Vector3(newv);
            return(true);
        }