/*
 * pBrush.java
 *
 * (C) 2005, Alex S.
 */

/**
 * the `object'; has a bunch of faces.
 */
public class pBrush {
    public int type;
    public static final int SOLID = 1;

    public int numFaces;
    public pFace[] faces = new pFace[128];

    public pBrush(){
        type = SOLID;
        numFaces = 0;
    }
    public pBrush(int type){
        this.type = type;
        numFaces = 0;
    }

    public boolean isInside(double x,double y,double z){
        for (int i=0;i<numFaces;i++) {
            if (faces[i].plane.eval(x,y,z) >= 0)
                return false;
        }
        return true;
    }
}


