com.jmex.subdivision
Enum SubdivisionButterfly.VertexType

java.lang.Object
  extended by java.lang.Enum<SubdivisionButterfly.VertexType>
      extended by com.jmex.subdivision.SubdivisionButterfly.VertexType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SubdivisionButterfly.VertexType>
Enclosing class:
SubdivisionButterfly

public static enum SubdivisionButterfly.VertexType
extends java.lang.Enum<SubdivisionButterfly.VertexType>

Helper class to calculate which Rule to use when splitting an Edge whose vertices have Location and Valence Call: VertexType.getRule(valence1, location1, valence2, location2);

Author:
Tobias

Enum Constant Summary
EXTRAORDINARY_CREASE
           
EXTRAORDINARY_INTERIOR
           
REGULAR_CREASE
           
REGULAR_INTERIOR
           
 
Method Summary
static SubdivisionButterfly.Rule getRule(SubdivisionButterfly.Valence valence1, SubdivisionButterfly.Location location1, SubdivisionButterfly.Valence valence2, SubdivisionButterfly.Location location2)
          Calculates which subdivision Rule to use on an edge whose vertices have the provided Locations and Valances
static boolean isSame(SubdivisionButterfly.VertexType type1, SubdivisionButterfly.VertexType type2, SubdivisionButterfly.VertexType comp1, SubdivisionButterfly.VertexType comp2)
          Compares the permutations of the types
static SubdivisionButterfly.VertexType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SubdivisionButterfly.VertexType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

REGULAR_INTERIOR

public static final SubdivisionButterfly.VertexType REGULAR_INTERIOR

REGULAR_CREASE

public static final SubdivisionButterfly.VertexType REGULAR_CREASE

EXTRAORDINARY_INTERIOR

public static final SubdivisionButterfly.VertexType EXTRAORDINARY_INTERIOR

EXTRAORDINARY_CREASE

public static final SubdivisionButterfly.VertexType EXTRAORDINARY_CREASE
Method Detail

values

public static SubdivisionButterfly.VertexType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SubdivisionButterfly.VertexType c : SubdivisionButterfly.VertexType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SubdivisionButterfly.VertexType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getRule

public static SubdivisionButterfly.Rule getRule(SubdivisionButterfly.Valence valence1,
                                                SubdivisionButterfly.Location location1,
                                                SubdivisionButterfly.Valence valence2,
                                                SubdivisionButterfly.Location location2)
Calculates which subdivision Rule to use on an edge whose vertices have the provided Locations and Valances

Parameters:
valence1 -
location1 -
valence2 -
location2 -
Returns:
The Rule to use on an edge with the provided Locations and Valances

isSame

public static boolean isSame(SubdivisionButterfly.VertexType type1,
                             SubdivisionButterfly.VertexType type2,
                             SubdivisionButterfly.VertexType comp1,
                             SubdivisionButterfly.VertexType comp2)
Compares the permutations of the types

Parameters:
type1 -
type2 -
comp1 -
comp2 -
Returns:
true if they are equivalent