## panelPlanes panelPlanes — The tab where planes are defined. |

## Synopsis

    enum                PanelPlanesColumnId;
    ToolPanel*          panelPlanesInit                     ();
    gboolean            panelPlanesLoad_file                (VisuData *dataObj,
                                                             gchar *filename,
                                                             GError **error);
    gboolean            panelPlanesSet_use                  (VisuData *dataObj,
                                                             gboolean value);
    gboolean            panelPlanesSet_planeRendered        (Plane *plane,
                                                             gboolean status);
    gboolean            panelPlanesApply_hidingScheme       (VisuData *data);
    GtkListStore*       panelPlanesGet_listStore            ();
    Plane**             panelPlanesGet_listOfAllPlanes      (gboolean maskingPlanesOnly);

## Description

## Details

### enum PanelPlanesColumnId

    typedef enum
      {
        COLUMN_PLANE_DRAWN,
        COLUMN_PLANE_LABEL,
        COLUMN_PLANE_HIDE_IS_ON,
        COLUMN_PLANE_HIDDEN_SIDE,
        COLUMN_PLANE_COLOR_PIXBUF,
        COLUMN_PLANE_POINTER,
        N_COLUMN_PLANE
      } PanelPlanesColumnId;

Thesse are the description of the columns stored in the GtkListStore of this panel. See `panelPlanesGet_listStore()` to access this liststore.

`COLUMN_PLANE_DRAWN` | a boolean, code if the plane is drawn or not.
`COLUMN_PLANE_LABEL` | a string, the description of the plane (normal vector and distance to origin).
`COLUMN_PLANE_HIDE_IS_ON` | a boolean, code if the plane hide elements on one side.
`COLUMN_PLANE_HIDDEN_SIDE` | a boolean, code for the side.
`COLUMN_PLANE_COLOR_PIXBUF` | a pixbuf, a small colored square.
`COLUMN_PLANE_POINTER` | the pointer to the Plane object.
`N_COLUMN_PLANE` | the number of columns.

### panelPlanesInit ()

    ToolPanel*          panelPlanesInit                     ();

Should be used in the list declared in externalModules.h to be loaded by V_Sim on start-up. This routine will create the ToolPanel where the plane stuff can be done, such as creating a plane, masking nodes, changing the orientation or the colour...

Returns : | a newly created ToolPanel object.

### panelPlanesLoad_file ()

    gboolean            panelPlanesLoad_file                (VisuData *dataObj,
                                                             gchar *filename,
                                                             GError **error);

This method is used to parse and load an XML file containing planes informations. The panel must have been initialised before calling this method. The `error` argument is required (can't be NULL), since it is set if something went wrong.

`dataObj` : | a VisuData object to associate the planes to (required to compute the intersection with the bounding box) ;
`filename` : | the path to the file to load ;
`error` : | a pointer to a GError handler to reccord possible failure.
Returns : | TRUE if `panelPlanesApply_hidingScheme()`.

### panelPlanesSet_use ()

    gboolean            panelPlanesSet_use                  (VisuData *dataObj,
                                                             gboolean value);

When `value` is TRUE, the planes are used and drawn. If the panel has not been created yet, a call to this function will do it.

`dataObj` : | a VisuData object to associate the planes to (required to compute the intersection with the bounding box) ;
`value` : | a boolean.
Returns : | TRUE if the status of the planes has been changed by this method.

### panelPlanesSet_planeRendered ()

    gboolean            panelPlanesSet_planeRendered        (Plane *plane,
                                                             gboolean status);

Change the visibility of the plane through the Gtk interface, then the widgets are also update and the list of drawn planes is rebuilt. To only directly change the visibility of one plane use `planeSet_rendered()` instead.

`plane` : | a Plane object ;
`status` : | a boolean.
Returns : | TRUE if the redraw sigbnal should be emitted.

### panelPlanesApply_hidingScheme ()

    gboolean            panelPlanesApply_hidingScheme       (VisuData *data);

Use this method to hide nodes according to current list of planes and hiding policy.

`data` : | a VisuData object to associate the planes to (required to compute the intersection with the bounding box) ;
Returns : | TRUE if `visu_data_createAllNodes()` should be called and the redraw signal emitted.

### panelPlanesGet_listStore ()

    GtkListStore*       panelPlanesGet_listStore            ();

This method gives read access to the GtkListStore used to store the planes.

Returns : | the GtkListStore used by this panel to store its planes. It should be considered read-only.

### panelPlanesGet_listOfAllPlanes ()

    Plane**             panelPlanesGet_listOfAllPlanes      (gboolean maskingPlanesOnly);

Return a newly created list (to be freed with `g_list_free()`) of all planes available in the subpanel. This list can be restricted to masking planes only with the help of argument `maskingPlanesOnly`.

`maskingPlanesOnly` : | a boolean.
Returns : | a newly created array NULL terminated that must be freed with `g_free()`.