![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#define VISU_UI_SURFACE_NAME_CHOOSE #define VISU_UI_SURFACE_NAME_STR enum VisuUiSurfacesFieldId; void visu_ui_panel_surfaces_add (gchar *filename
,float value
,gchar *name
); void visu_ui_panel_surfaces_addField (VisuScalarField *field
,GtkTreeIter *iter
); void visu_ui_panel_surfaces_addSurfaces (VisuSurfaces *surf
,const gchar *name
,GtkTreeIter *iter
); const VisuSurfaces * visu_ui_panel_surfaces_compute (GtkTreeIter *iter
,const float *values
,const gchar **names
,guint nValues
); const VisuSurfaces * visu_ui_panel_surfaces_computeAuto (GtkTreeIter *iter
); void visu_ui_panel_surfaces_editProperties (GtkTreeIter *iter
); gboolean visu_ui_panel_surfaces_exportXMLFile (const gchar *filename
,GError **error
); GtkWidget * visu_ui_panel_surfaces_generateValues (int *nbValues
,float **values
,gchar **name
,float minVal
,float maxVal
); GtkListStore * visu_ui_panel_surfaces_getFields (); gboolean visu_ui_panel_surfaces_hide (VisuPlane **planes
); VisuUiPanel * visu_ui_panel_surfaces_init (); gboolean visu_ui_panel_surfaces_loadFile (const char *file_name
,VisuBox *boxToFit
,GHashTable *table
,VisuScalarFieldMethod *meth
); gboolean visu_ui_panel_surfaces_parseXMLFile (const gchar *filename
,GError **error
); gboolean visu_ui_panel_surfaces_setUsed (gboolean used
); gboolean visu_ui_panel_surfaces_showAll (gboolean show
); void visu_ui_panel_surfaces_updateAtIter (GtkTreeIter *iter
);
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 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.
#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.
typedef enum { VISU_UI_SURFACES_FIELD_LABEL, VISU_UI_SURFACES_FIELD_POINTER, VISU_UI_SURFACES_FIELD_N_COLUMNS } 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.
a string, the description of the scalar field. | |
the pointer to the VisuScalarField object. | |
the number of columns. |
void visu_ui_panel_surfaces_add (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 visu_ui_panel_surfaces_addField (VisuScalarField *field
,GtkTreeIter *iter
);
This routine can be used to add a VisuScalarField to the tree
view. iter
is then populated with the row it has been inserted to.
|
a VisuScalarField object. [transfer full] |
|
a location to store the iter. [out caller-allocates] |
Since 3.7
void visu_ui_panel_surfaces_addSurfaces (VisuSurfaces *surf
,const gchar *name
,GtkTreeIter *iter
);
This routine can be used to add a VisuSurfaces to the tree
view. iter
is then populated with the row it has been inserted to.
|
a VisuSurfaces object. [transfer full] |
|
a name surf comes from. |
|
a location to store the iter. [out caller-allocates] |
Since 3.7
const VisuSurfaces * visu_ui_panel_surfaces_compute (GtkTreeIter *iter
,const float *values
,const gchar **names
,guint nValues
);
This routine will generate nValues
surfaces for the
VisuScalarField located at iter
. It will redraw if necessary.
|
a GtkTreeIter. |
|
values to create surfaces at. [array length=nValues] |
|
names for the new surfaces. [array length=nValues] |
|
number of surfaces to create. |
Returns : |
a VisuSurfaces object. [transfer none] |
Since 3.7
const VisuSurfaces * visu_ui_panel_surfaces_computeAuto (GtkTreeIter *iter
);
Add new surfaces to the entry pointed by iter
. This entry must be
a VisuScalarField object. This routine will redraw if necessary.
|
a GtkTreeIter. |
Returns : |
a VisuSurfaces object. [transfer none] |
Since 3.7
void visu_ui_panel_surfaces_editProperties
(GtkTreeIter *iter
);
Opens a new window allowing to edit surface properties.
|
the currently selected row iter (or NULL). |
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.
|
a filename to export to. |
|
a location to store an error. [allow-none] |
Returns : |
TRUE if everything goes right. |
Since 3.7
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
.
|
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. [transfer full] |
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] |
gboolean visu_ui_panel_surfaces_hide (VisuPlane **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. |
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...
Returns : |
a newly created VisuUiPanel object. |
gboolean visu_ui_panel_surfaces_loadFile (const char *file_name
,VisuBox *boxToFit
,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.
|
the file you want to try to load. [type filename] |
|
a VisuBox object to fit to ;. [allow-none] |
|
a set of different Option (can be NULL). [allow-none] |
|
a VisuScalarFieldMethod object. |
Returns : |
TRUE in case of success. |
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.
|
a location to read the XML data. |
|
a location to store possible error. |
Returns : |
TRUE on success. |
gboolean visu_ui_panel_surfaces_setUsed (gboolean used
);
Change the status of the isosurface extension, drawn or not.
|
a boolean. |
Returns : |
TRUE if the OpenGLAskForReDraw signal should be emitted. |
gboolean visu_ui_panel_surfaces_showAll (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. |
void visu_ui_panel_surfaces_updateAtIter (GtkTreeIter *iter
);
Reset the shown surfaces at iter
.
|
an iterator. |
Since 3.7