public class Corner extends Object implements Comparable<Corner>
Modifier and Type | Field and Description |
---|---|
static int |
COUNT
Number of corners in a cube (8).
|
static Corner |
ORIGIN
The origin.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Corner other)
Defines some arbitrary but consistent ordering of corners.
|
boolean |
equals(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() |
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 int compareTo(Corner other)
compareTo
in interface Comparable<Corner>
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.