com.jmex.subdivision
Class SubdivisionButterfly.Edge

java.lang.Object
  extended by com.jmex.subdivision.SubdivisionButterfly.Edge
Enclosing class:
SubdivisionButterfly

public class SubdivisionButterfly.Edge
extends java.lang.Object

Inner helper class for SubdivisonBatch to keep track of the edges

Author:
Tobias
See Also:
SubdivisionButterfly.findEdgesAndTriangles()

Field Summary
 SubdivisionButterfly.Edge[] newEdges
          The two new Edges that were created when splitting this Edge
 int newVertexIndex
          The new vertex that was created when splitting this Edge
 SubdivisionButterfly.Triangle[] triangles
          The one or two triangle(s) sharing this edge
 int[] vertexIndex
          The two vertex indices of this Edge
 
Constructor Summary
SubdivisionButterfly.Edge()
          Constructor
SubdivisionButterfly.Edge(int i1, int i2)
          Constructor
 
Method Summary
 boolean equals(int i1, int i2)
          Does this Edge have the same vertex indices as those provided.
 boolean equals(SubdivisionButterfly.Edge edge)
          Does this Edge have the same vertex indices as the provided Edge.
 boolean hasVertex(int vertexIndex)
           
 int otherVertex(int vertexIndex)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

vertexIndex

public int[] vertexIndex
The two vertex indices of this Edge


newEdges

public SubdivisionButterfly.Edge[] newEdges
The two new Edges that were created when splitting this Edge


triangles

public SubdivisionButterfly.Triangle[] triangles
The one or two triangle(s) sharing this edge


newVertexIndex

public int newVertexIndex
The new vertex that was created when splitting this Edge

Constructor Detail

SubdivisionButterfly.Edge

public SubdivisionButterfly.Edge()
Constructor


SubdivisionButterfly.Edge

public SubdivisionButterfly.Edge(int i1,
                                 int i2)
Constructor

Parameters:
i1 - One vertex index of this Edge
i2 - The other vertex index of this Edge
Method Detail

equals

public boolean equals(SubdivisionButterfly.Edge edge)
Does this Edge have the same vertex indices as the provided Edge. The order of the vertex indices does not matter.

Parameters:
edge - The Edge to compare this Edge to
Returns:
true if they are the same

equals

public boolean equals(int i1,
                      int i2)
Does this Edge have the same vertex indices as those provided. The order of the vertex indices does not matter.

Parameters:
i1 - One vertex index
i2 - Another vertex index
Returns:
true if the vertex indices in this Edge are the same as those provided

hasVertex

public boolean hasVertex(int vertexIndex)
Parameters:
vertexIndex - The index to look for
Returns:
true if this Edge contains the provided vertexIndex

otherVertex

public int otherVertex(int vertexIndex)
Parameters:
vertexIndex - The index that we already know of of this Edge
Returns:
The other vertex index of this Edge

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a String representing this Edge