private void evaluateMinMax(Point3D vertex){
        
        if(Double.isNaN(maxX)){
            maxX = vertex.getX();
            minX = vertex.getX();
            maxY = vertex.getY();
            minY = vertex.getY();
            maxZ = vertex.getZ();
            minZ = vertex.getZ();
        }
        
        if(maxX < vertex.getX()){
            maxX = vertex.getX();
        } else if (minX > vertex.getX()){
            minX = vertex.getX();
        }
        
        if(maxY < vertex.getY()){
            maxY = vertex.getY();
        } else if (minY > vertex.getY()){
            minY = vertex.getY();
        }
        
        if(maxZ < vertex.getZ()){
            maxZ = vertex.getZ();
        } else if (minZ > vertex.getZ()){
            minZ = vertex.getZ();
        }
        
    }