Beispiel #1
0
    /// <summary>
    /// Adds the edge data to the cell at startXYZ + cornerOffsetXYZ if it exists (not out of range)
    /// return the cell so we can preprocess for meshing?
    /// </summary>
    public GridCell AddToCellQEF(GridEdge e, int sx, int sy, int sz, int cox, int coy, int coz)
    {
        int x = sx + cox;
        int y = sy + coy;
        int z = sz + coz;

        if (x >= 0 && x < subdivisions &&
            y >= 0 && y < subdivisions &&
            z >= 0 && z < subdivisions)
        {
            //it exists
            GridCell cell = cells[x, y, z];
            cell.AddQEF(e.intersection, e.normal);
            return(cell);
        }
        else
        {
            //NOPE! Chuck Testa
            return(null);
        }
    }