예제 #1
0
        /// <summary>
        /// Generates an informative description of this instance.
        /// </summary>
        public override string ToString()
        {
            string min   = (MinZ == float.MinValue ? "(" : "[" + MinZ.ToString("N2"));
            string max   = (MaxZ == float.MaxValue ? ")" : MaxZ.ToString("N2") + "]");
            string range = min + ',' + max;

            return(string.Format(
                       "{0} {1} point to {2} {3} point over range {4}",
                       m_sourceName, m_sourcePoint, m_targetName, m_targetPoint, range
                       ));
        }
예제 #2
0
 public bool Search(string str)
 {
     if (MinX.ToString().Contains(str) || MinY.ToString().Contains(str) || MinZ.ToString().Contains(str) ||
         MaxX.ToString().Contains(str) || MaxY.ToString().Contains(str) || MaxZ.ToString().Contains(str))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #3
0
        /// <summary>
        /// Hashcode method
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            int hashCode = -1838259446;

            hashCode = hashCode * -1521134295 + MinX.GetHashCode();
            hashCode = hashCode * -1521134295 + MinY.GetHashCode();
            hashCode = hashCode * -1521134295 + MinZ.GetHashCode();
            hashCode = hashCode * -1521134295 + MaxX.GetHashCode();
            hashCode = hashCode * -1521134295 + MaxY.GetHashCode();
            hashCode = hashCode * -1521134295 + MaxZ.GetHashCode();
            return(hashCode);
        }
예제 #4
0
        protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            ele.TryPathTo("Divisor", true, out subEle);
            subEle.Value = Divisor.ToString();

            ele.TryPathTo("MaxDistance/X", true, out subEle);
            subEle.Value = MaxDistanceX.ToString("G15");

            ele.TryPathTo("MaxDistance/Y", true, out subEle);
            subEle.Value = MaxDistanceY.ToString("G15");

            ele.TryPathTo("Min/X", true, out subEle);
            subEle.Value = MinX.ToString("G15");

            ele.TryPathTo("Min/Y", true, out subEle);
            subEle.Value = MinY.ToString("G15");

            ele.TryPathTo("Min/Z", true, out subEle);
            subEle.Value = MinZ.ToString("G15");

            ele.TryPathTo("Max/X", true, out subEle);
            subEle.Value = MaxX.ToString("G15");

            ele.TryPathTo("Max/Y", true, out subEle);
            subEle.Value = MaxY.ToString("G15");

            ele.TryPathTo("Max/Z", true, out subEle);
            subEle.Value = MaxZ.ToString("G15");

            ele.TryPathTo("Cell", true, out subEle);
            foreach (List <short> list in Cell)
            {
                XElement cell = new XElement("Row");
                foreach (short num in list)
                {
                    cell.Add(new XElement("Triangle", num));
                }
                subEle.Add(cell);
            }
        }
예제 #5
0
파일: Node.cs 프로젝트: rt-2/CodeWalker
 public override string ToString()
 {
     return(PositionX.ToString() + ", " + PositionY.ToString() + ": " + MinZ.ToString() + ", " + MaxZ.ToString() + ": " + HeightmapDimX.ToString() + " x " + HeightmapDimY.ToString());
 }