panelPlanes

panelPlanes — The tab where planes are defined.

Synopsis

enum                VisuUiPanelPlanesColumnId;
gboolean            visu_ui_panel_planes_add            (VisuPlane *plane,
                                                         gboolean hidingStatus,
                                                         gboolean hidingSide);
gboolean            visu_ui_panel_planes_applyHidingScheme
                                                        (VisuData *data);
VisuPlane **        visu_ui_panel_planes_getAll         (gboolean maskingOnly);
GtkListStore *      visu_ui_panel_planes_getList        ();
VisuUiPanel *       visu_ui_panel_planes_init           ();
gboolean            visu_ui_panel_planes_load           (VisuData *dataObj,
                                                         gchar *filename,
                                                         GError **error);
gboolean            visu_ui_panel_planes_setRendered    (VisuPlane *plane,
                                                         gboolean status);
gboolean            visu_ui_panel_planes_setUsed        (gboolean value);

Description

It is possible to get the list of planes using visu_ui_panel_planes_getAll(). One can also access to the list store hosting the planes by calling visu_ui_panel_planes_getList().

Details

enum VisuUiPanelPlanesColumnId

typedef enum {
    VISU_UI_PANEL_PLANES_DRAWN,
    VISU_UI_PANEL_PLANES_LABEL,
    VISU_UI_PANEL_PLANES_HIDE_IS_ON,
    VISU_UI_PANEL_PLANES_HIDDEN_SIDE,
    VISU_UI_PANEL_PLANES_COLOR_PIXBUF,
    VISU_UI_PANEL_PLANES_POINTER,
    VISU_UI_PANEL_PLANES_N_COLUMNS
} VisuUiPanelPlanesColumnId;

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

VISU_UI_PANEL_PLANES_DRAWN

a boolean, code if the plane is drawn or not.

VISU_UI_PANEL_PLANES_LABEL

a string, the description of the plane (normal vector and distance to origin).

VISU_UI_PANEL_PLANES_HIDE_IS_ON

a boolean, code if the plane hide elements on one side.

VISU_UI_PANEL_PLANES_HIDDEN_SIDE

a boolean, code for the side.

VISU_UI_PANEL_PLANES_COLOR_PIXBUF

a pixbuf, a small colored square.

VISU_UI_PANEL_PLANES_POINTER

the pointer to the VisuPlane object.

VISU_UI_PANEL_PLANES_N_COLUMNS

the number of columns.

visu_ui_panel_planes_add ()

gboolean            visu_ui_panel_planes_add            (VisuPlane *plane,
                                                         gboolean hidingStatus,
                                                         gboolean hidingSide);

Add a plane to the list of planes.

plane :

a VisuPlane object. [transfer full]

hidingStatus :

if plane is used for hiding.

hidingSide :

the side hiding is done on.

Returns :

TRUE if redraw is needed.

Since 3.7


visu_ui_panel_planes_applyHidingScheme ()

gboolean            visu_ui_panel_planes_applyHidingScheme
                                                        (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 the redraw signal should be emitted.

visu_ui_panel_planes_getAll ()

VisuPlane **        visu_ui_panel_planes_getAll         (gboolean maskingOnly);

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 maskingOnly.

maskingOnly :

a boolean.

Returns :

a newly created array NULL terminated that must be freed with g_free(). [array zero-terminated=1][transfer container]

visu_ui_panel_planes_getList ()

GtkListStore *      visu_ui_panel_planes_getList        ();

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. [transfer none]

visu_ui_panel_planes_init ()

VisuUiPanel *       visu_ui_panel_planes_init           ();

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

Returns :

a newly created VisuUiPanel object.

visu_ui_panel_planes_load ()

gboolean            visu_ui_panel_planes_load           (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 visu_ui_panel_planes_applyHidingScheme().

visu_ui_panel_planes_setRendered ()

gboolean            visu_ui_panel_planes_setRendered    (VisuPlane *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 visu_plane_setRendered() instead.

plane :

a VisuPlane object ;

status :

a boolean.

Returns :

TRUE if the redraw sigbnal should be emitted.

visu_ui_panel_planes_setUsed ()

gboolean            visu_ui_panel_planes_setUsed        (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.

value :

a boolean.

Returns :

TRUE if the hiding scheme has been applied.