ShadowTriangle tri = (ShadowTriangle) faces.get(t);
ShadowTriangle tri = faces.get(t);
    private ShadowEdge[] getShadowEdges() {        // Create a dynamic structure to contain the vertices        ArrayList<ShadowEdge>shadowEdges = new ArrayList<ShadowEdge>();        // Now work through the faces        for (int t = 0; t < maxIndex; t++) {            // Check whether this is a front facing triangle            if (facing.get(t)) {                ShadowTriangle tri = (ShadowTriangle) faces.get(t);                // If it is then check if any of the edges are connected to a                // back facing triangle or are unconnected                checkAndAdd(tri.edge1, shadowEdges);                checkAndAdd(tri.edge2, shadowEdges);                checkAndAdd(tri.edge3, shadowEdges);            }        }        return (ShadowEdge[]) shadowEdges.toArray(new ShadowEdge[0]);    }