Class ExtractSurfaceTetra.Triangle

  • Enclosing class:
    ExtractSurfaceTetra

    protected class ExtractSurfaceTetra.Triangle
    extends java.lang.Object
    A rational representation of a level set triangle. The triangle just stores vertex indices and is unconcerned about the actual vertex locations. The class extends Object for hashing support.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int m_iV0
      indices into the vertex array.
      int m_iV1
      indices into the vertex array.
      int m_iV2
      indices into the vertex array.
    • Constructor Summary

      Constructors 
      Constructor Description
      Triangle()
      Create a triangle (invalid one since the indices are negative).
      Triangle​(int iV0, int iV1, int iV2)
      Create a triangle.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object kObject)
      Support for hashing into a map of triangles.
      int hashCode()
      Support for hashing into a map of triangles.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • m_iV0

        public int m_iV0
        indices into the vertex array.
      • m_iV1

        public int m_iV1
        indices into the vertex array.
      • m_iV2

        public int m_iV2
        indices into the vertex array.
    • Constructor Detail

      • Triangle

        public Triangle()
        Create a triangle (invalid one since the indices are negative).
      • Triangle

        public Triangle​(int iV0,
                        int iV1,
                        int iV2)
        Create a triangle. The triangle is considered to be different than . To minimize computation time in comparisons during hashing, the triangle is stored so that the minimum index occurs first.
        Parameters:
        iV0 - a triangle vertex
        iV1 - a triangle vertex
        iV2 - a triangle vertex
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object kObject)
        Support for hashing into a map of triangles.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        kObject - a triangle for comparison to the current one
        Returns:
        true iff the triangles are identical
      • hashCode

        public int hashCode()
        Support for hashing into a map of triangles.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hash key for the triangle