panelSurfaces

panelSurfaces — Gtk interface to load isosurfaces.

Functions

Types and Values

Description

This module contains the panel used to draw isosurfaces. From it, you can draw isosurfaces on screen after they are loaded through the VisuGlExtSurfaces object. You can also access tools to manage and create .surf files, these tools are related to the panelSurfacesTools module.

Functions

visu_ui_panel_surfaces_init ()

VisuUiPanel *
visu_ui_panel_surfaces_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 iso-surfaces stuff can be done, such as creating a surface, loading a scalar field, changing the properties...

[skip]

Returns

a newly created VisuUiPanel object.


visu_ui_panel_surfaces_loadFile ()

gboolean
visu_ui_panel_surfaces_loadFile (const char *file_name,
                                 GtkTreeIter *iter,
                                 GHashTable *table,
                                 VisuScalarFieldMethod *meth);

Tries to load the given file_name and if it succeeds, adds loaded surfaces to the isosurfaces panel. If file_name is a VisuScalarField then, meth is used to load it. If fitToBox is not NULL, the load surfaces or scalar fields are fit to it.

Parameters

file_name

the file you want to try to load.

[type filename]

iter

a location to store the GtkTreeIter that will be set.

[out caller-allocates]

table

a set of different Option (can be NULL).

[allow-none]

meth

a VisuScalarFieldMethod object.

 

Returns

TRUE in case of success.


visu_ui_panel_surfaces_addSurfaces ()

void
visu_ui_panel_surfaces_addSurfaces (GList *surfs,
                                    const gchar *name,
                                    GtkTreeIter *iter);

This routine can be used to add a VisuSurface to the tree view. iter is then populated with the row it has been inserted to.

Parameters

surfs

a VisuSurface object.

[element-type VisuSurface*]

name

a name surf comes from.

 

iter

a location to store the iter.

[out caller-allocates]

Since: 3.7


visu_ui_panel_surfaces_addSurface ()

void
visu_ui_panel_surfaces_addSurface (VisuSurface *surf,
                                   GtkTreeIter *root,
                                   GtkTreeIter *iter);

This routine can be used to add a VisuSurface to the tree view. iter is then populated with the row it has been inserted to.

Parameters

surf

a VisuSurface object.

[transfer full]

root

the iter to attach the surface to.

[allow-none]

iter

a location to store the iter.

[out caller-allocates]

Since: 3.7


visu_ui_panel_surfaces_parseXMLFile ()

gboolean
visu_ui_panel_surfaces_parseXMLFile (const gchar *filename,
                                     GError **error);

This routine reads an XML file and setup the resources and the isovalues to the selected row accordingly.

Parameters

filename

a location to read the XML data.

 

error

a location to store possible error.

 

Returns

TRUE on success.


visu_ui_panel_surfaces_exportXMLFile ()

gboolean
visu_ui_panel_surfaces_exportXMLFile (const gchar *filename,
                                      GError **error);

Export to filename the list of isosurfaces values of the selected scalar-field file.

Parameters

filename

a filename to export to.

 

error

a location to store an error.

[allow-none]

Returns

TRUE if everything goes right.

Since: 3.7


visu_ui_panel_surfaces_showAll ()

gboolean
visu_ui_panel_surfaces_showAll (gboolean show);

Shows or hides all surfaces and check their "draw" status in the panel accordingly.

Parameters

show

TRUE to show all surfaces, FALSE to hide them.

 

Returns

TRUE if surface list should be rebuild and redraw.


visu_ui_panel_surfaces_editProperties ()

void
visu_ui_panel_surfaces_editProperties (GtkTreeIter *iter);

Opens a new window allowing to edit surface properties.

Parameters

iter

the currently selected row iter (or NULL).

 

visu_ui_panel_surfaces_compute ()

void
visu_ui_panel_surfaces_compute (const VisuScalarField *field,
                                const float *values,
                                const gchar **names,
                                guint nValues);

visu_ui_panel_surfaces_getFields ()

GtkListStore *
visu_ui_panel_surfaces_getFields ();

This method gives read access to the GtkListStore used to store the scalar field files.

Returns

the GtkListStore used by this panel to store its scalar fields. It should be considered read-only.

[transfer none]


visu_ui_panel_surfaces_fieldsAt ()

VisuScalarField *
visu_ui_panel_surfaces_fieldsAt (GtkTreeModel *model,
                                 GtkTreeIter *iter);

Retrieves the VisuScalarField object stored at iter , if any.

Parameters

model

a GtkTreeModel object.

 

iter

a GtkTreeIter iter.

 

Returns

a VisuScalarField object.

[transfer none]

Since: 3.8


visu_ui_panel_surfaces_generateValues ()

GtkWidget *
visu_ui_panel_surfaces_generateValues (int *nbValues,
                                       float **values,
                                       gchar **name,
                                       float minVal,
                                       float maxVal);

This method opens a little dialog window that is made to help the user enter a list of values for creation of iso-surfaces. These values are generated between minVal and maxVal .

Parameters

nbValues

a location of an integer to store the number of generated values ;

 

values

a pointer on a float array. The target of this pointer must be NULL and it will be allocated after a call to this method. Use g_free() after use to free it.

 

name

a pointer to store a name. The target of this pointer must be NULL on enter. It is associated only if a name is given.

 

minVal

the minimum value for the range ;

 

maxVal

the maximum value for the range.

 

Returns

the dialog widget.

[transfer full]

Types and Values

enum VisuUiSurfacesFieldId

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

Members

VISU_UI_SURFACES_FIELD_LABEL

a string, the description of the scalar field.

 

VISU_UI_SURFACES_FIELD_ROW

a column storing internal pointers.

 

VISU_UI_SURFACES_FIELD_N_COLUMNS

the number of columns.

 

VISU_UI_SURFACE_NAME_STR

#define VISU_UI_SURFACE_NAME_STR    "Choose an id name"

The default string used to name surfaces that are not associated to any public surface ressource.


VISU_UI_SURFACE_NAME_CHOOSE

#define VISU_UI_SURFACE_NAME_CHOOSE "<span size=\"smaller\"><i>"VISU_UI_SURFACE_NAME_STR"</i></span>"

The string used in the tree view to represent the surfaces that don't share surface resources.