java.lang.Comparable
public class Corner
extends java.lang.Object
implements java.lang.Comparable
Modifier and Type | Field | Description |
---|---|---|
static int |
COUNT |
Number of corners in a cube (8).
|
static Corner |
ORIGIN |
The origin.
|
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(java.lang.Object other) |
Defines some arbitrary but consistent ordering of corners.
|
boolean |
equals(java.lang.Object other) |
|
Corner[] |
getAdjacent() |
Returns an array of the three corners which are adjacent to this one
(connected by a cube edge).
|
static Corner |
getCorner(int index) |
Factory method giving one of the cube corners.
|
boolean[] |
getFlags() |
Returns an array of boolean flags; the
i 'th flag
indicates whether the i 'th coordinate is low or high
(zero or one for a unit cube). |
int |
hashCode() |
|
java.lang.String |
toString() |
public static final int COUNT
public static final Corner ORIGIN
public Corner[] getAdjacent()
public boolean[] getFlags()
i
'th flag
indicates whether the i
'th coordinate is low or high
(zero or one for a unit cube).public static Corner getCorner(int index)
index
determines which corner you get.index
- corner ID; 0 <= index < 8public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(java.lang.Object other)
compareTo
in interface java.lang.Comparable
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.