![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
#define SURFACE_NAME_CHOOSE #define SURFACE_NAME_STR enum PanelIsosurfacesColumnId; ToolPanel* panelIsosurfacesInit (); GtkListStore* panelIsosurfacesGet_listStore (); gboolean panelIsosurfacesSet_used (VisuData *dataObj, gboolean used); void panelIsosurfacesAdd_withValue (gchar *filename, float value, gchar *name); void panelIsosurfacesEdit_surfaceProperties (GtkTreeIter *iter); gboolean panelIsosurfacesLoad_file (const char *file_name, gboolean fit_to_box, VisuData *data, OptionTable *table, float **box); gboolean panelIsosurfacesShow_all (gboolean show); GtkWidget* panelIsosurfacesGenerate_isoValues (int *nbValues, float **values, gchar **name, float minVal, float maxVal); gboolean panelIsosurfacesHide (Plane **planes); gboolean panelIsosurfacesParse_XMLFile (const gchar *filename, GError **error);
This module contains the panel used to draw isosurfaces. From it, you can draw isosurfaces on screen after they are loaded through the surfaces module. You can also access tools to manage and create .surf files, these tools are related to the panelSurfacesTools module.
#define SURFACE_NAME_CHOOSE "<span size=\"smaller\"><i>"SURFACE_NAME_STR"</i></span>"
The string used in the tree view to represent the surfaces that don't share surface resources.
#define SURFACE_NAME_STR "Choose an id name"
The default string used to name surfaces that are not associated to any public surface ressource.
typedef enum { COLUMN_FIELD_LABEL, COLUMN_FIELD_POINTER, NB_COLUMN_FIELD } PanelIsosurfacesColumnId;
Thesse are the description of the columns stored in the GtkListStore
of this panel. See panelIsosurfacesGet_listStore()
to access this liststore.
a string, the description of the scalar field. | |
the pointer to the ScalarField object. | |
the number of columns. |
ToolPanel* panelIsosurfacesInit ();
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 iso-surfaces stuff can be done, such as creating a surface, loading a scalar field, changing the properties...
Returns : |
a newly created ToolPanel object. |
GtkListStore* panelIsosurfacesGet_listStore ();
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. |
gboolean panelIsosurfacesSet_used (VisuData *dataObj, gboolean used);
Change the status of the isosurface extension, drawn or not.
|
the current VisuData (can be NULL) ; |
|
a boolean. |
Returns : |
TRUE if the OpenGLAskForReDraw signal should be emitted. |
void panelIsosurfacesAdd_withValue (gchar *filename, float value, gchar *name);
Create and add a surface created from the given scalar field. This
field must already be loaded. If name
is not given, the surface will
be called "Isosurface id" where id is an increasing counter.
|
the name of the scalar field from which to add a surface ; |
|
the iso value ; |
|
the name used to identify the new surface (can be NULL). |
void panelIsosurfacesEdit_surfaceProperties (GtkTreeIter *iter);
Opens a new window allowing to edit surface properties.
|
the currently selected row iter (or NULL). |
gboolean panelIsosurfacesLoad_file (const char *file_name, gboolean fit_to_box, VisuData *data, OptionTable *table, float **box);
Tries to load the given file_name
and if it succeeds, adds loaded surfaces
to the isosurfaces panel. In all cases, all previously loaded surfaces are
removed from the panel (and from memory).
|
the file you want to try to load |
|
whether these isosurfaces should be resized in order to fit to the current VisuBox ; |
|
the VisuData to fit the box to (can be NULL if fit_to_box
is false ;
|
|
a set of different Option (can be NULL). |
|
a location to store the 6 values defining the loaded box (can be NULL). |
Returns : |
TRUE in case of success. |
gboolean panelIsosurfacesShow_all (gboolean show);
Shows or hides all surfaces and check their "draw" status in the panel accordingly.
|
TRUE to show all surfaces, FALSE to hide them. |
Returns : |
TRUE if surface list should be rebuild and redraw. |
GtkWidget* panelIsosurfacesGenerate_isoValues (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
.
|
a location of an integer to store the number of generated 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.
|
|
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. |
|
the minimum value for the range ; |
|
the maximum value for the range. |
Returns : |
the dialog widget. |
gboolean panelIsosurfacesHide (Plane **planes);
Must be called after the initialisation of the plane subpanel. It applies the masking scheme of planes on current surfaces.
|
an array of planes to be applied (NULL terminated). |
Returns : |
TRUE if the surface should be rebuilt. |