Пример #1
0
        /// <summary>
        /// Returns the z coordinate for a vertex
        /// </summary>
        /// <param name="ElementIndex">The element index</param>
        /// <param name="VertexIndex">The vertex index</param>
        /// <returns>The z coordinate</returns>
        public virtual double GetZCoordinate(int ElementIndex, int VertexIndex)
        {
            Element element = (Element)_elements[ElementIndex];
            Vertex  vertex  = element.GetVertex(VertexIndex);

            return(vertex.z);
        }
Пример #2
0
        ///<summary>
        /// Check if the current instance equals another instance of this class.
        ///</summary>
        ///<param name="obj">The instance to compare the current instance with.</param>
        ///<returns><code>true</code> if the instances are the same instance or have the same content.</returns>
        public override bool Equals(Object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }
            Element e = (Element)obj;

            if (!ID.Equals(e.ID))
            {
                return(false);
            }
            if (VertexCount != e.VertexCount)
            {
                return(false);
            }
            for (int i = 0; i < VertexCount; i++)
            {
                if (!GetVertex(i).Equals(e.GetVertex(i)))
                {
                    return(false);
                }
            }
            return(true);
        }
Пример #3
0
        /// <summary>
        /// Returns the z coordinate for a vertex
        /// </summary>
        /// <param name="elementIndex">The element index</param>
        /// <param name="vertexIndex">The vertex index</param>
        /// <returns>The z coordinate</returns>
        public virtual double GetZCoordinate(int elementIndex, int vertexIndex)
        {
            Element    element = (Element)elements[elementIndex];
            Coordinate vertex  = element.GetVertex(vertexIndex);

            return(vertex.Z);
        }
Пример #4
0
		///<summary>
		/// Check if the current instance equals another instance of this class.
		///</summary>
		///<param name="obj">The instance to compare the current instance with.</param>
		///<returns><code>true</code> if the instances are the same instance or have the same content.</returns>
		public override bool Equals(Object obj) 
		{
			if (obj == null || GetType() != obj.GetType()) 
				return false;
		    Element e = (Element) obj;
			if (!ID.Equals(e.ID))
				return false;
			if (VertexCount!=e.VertexCount)
				return false;
			for (int i=0;i<VertexCount;i++)
				if (!GetVertex(i).Equals(e.GetVertex(i)))
					return false;
			return true;
		}
Пример #5
0
        public double GetVertexMCoordinate(int elementIndex, int vertexIndex)
        {
            Element element = (Element)elements[elementIndex];

            return(element.GetVertex(vertexIndex).M);
        }