protected int addPoint(Vector3d p) {
        Vector3d q;
        int index = 0;
        boolean found = false;

        for (int i = 0; i < points.size(); i++) {
            q = points.elementAt(i);
            if ((q.x == p.x) && (q.y == p.y) && (q.z == p.z)) {
                index = i;
                found = true;
                break;
            }
        }

        if (found)
            return index;
        else {
            points.addElement(p);
            points_.addElement(new Vector3d());
            inFOVs.addElement(false);
            return points.size() - 1;
        }
    }