Class PoCellFilter

  • All Implemented Interfaces:
    SafeDisposable
    Direct Known Subclasses:
    PoIntervalCellFilter

    public abstract class PoCellFilter
    extends PoNode
    Interface class defining a filter of cells. This abstract class specifies the interface used to filter cells. Filtering cells is a way to specify which cells are used to build the mesh representation. When the method acceptCell() returns false, this cell is not taken into account by the representation. It is as if the mesh did not contain this cell.

    In order to define a custom cell filter, you must create a class derived from this class. The custom cell filter can be based either on a cell's index or its value. The data set used to check if acceptCell returns true or false is the current data set during the traversal selected by the field PoMesh.valuesIndexForCellFilter.

    WARNING: At this time, the classes inherited from PoMesh2D ignore the cell filter.

    • Method Detail

      • acceptCell

        public boolean acceptCell​(int cell_index,
                                  float cell_value)
        Returns true if the cell is accepted. Accepted cells are used to build a shape.

        Parameters:
        cell_index - the index of the cell to be checked.

        cell_value - the value of the cell to be checked. This value is an element of the scalar data set currently selected by the representation (see PoMesh.valuesIndexForCellFilter).