Top | ![]() |
![]() |
![]() |
![]() |
VisuMap * | visu_map_new () |
VisuMap * | visu_map_new_fromPlane () |
gboolean | visu_map_setPlane () |
gboolean | visu_map_setSurface () |
gboolean | visu_map_setField () |
gboolean | visu_map_setLevel () |
gboolean | visu_map_setLines () |
gboolean | visu_map_setScaling () |
gboolean | visu_map_setScalingRange () |
void | visu_map_compute_sync () |
VisuPlane * | visu_map_getPlane () |
VisuScalarField * | visu_map_getField () |
gboolean | visu_map_getScaledMinMax () |
float * | visu_map_getFieldMinMax () |
const float * | visu_map_getScalingRange () |
float | visu_map_getLegendScale () |
float | visu_map_getLegendPosition () |
void | visu_map_draw () |
gboolean | visu_map_export () |
VisuScalarField * | field | Read / Write |
VisuPlane * | plane | Read / Write |
GArray * | range-min-max | Read / Write |
guint | scale | Read / Write |
VisuSurface * | surface | Read / Write |
A map is a coloured representation of a scalar field on a
plane. To define a new map, use visu_map_new_fromPlane()
and use
visu_map_setField()
to associate a scalarfield to it.
The representation of the map is done by an adaptive mesh of
triangles. One can adjust the size of the smaller resolution by
using visu_map_setLevel()
. Finally the level of adaptiveness is
chosen at rendering time by choosing a more or less crude precision
argument to visu_map_draw()
.
In adition to the colour representation, isolines can be
drawn at given iso-values, see visu_map_setLines()
.
An additionnal capability allows to export VisuMap into SVG or PDF vector files.
VisuMap *
visu_map_new_fromPlane (VisuPlane *plane
);
Creates a new VisuMap object, projected on plane
.
Since: 3.6
gboolean visu_map_setPlane (VisuMap *map
,VisuPlane *plane
);
Set the internal VisuPlane of map
to plane
. All changed to
plane
will be automatically propagated to map
. Use
visu_map_setField()
to choose the field to take values from, set
the level precision with visu_map_setLevel()
.
Since: 3.7
gboolean visu_map_setSurface (VisuMap *map
,VisuSurface *surface
);
Set the internal VisuSurface of map
to surface
. All changed to
surface
will be automatically propagated to map
. Use
visu_map_setField()
to choose the field to take values from, set
the level precision with visu_map_setLevel()
.
Since: 3.8
gboolean visu_map_setField (VisuMap *map
,VisuScalarField *field
);
It associates the values of field
to map
.
Since: 3.6
gboolean visu_map_setLevel (VisuMap *map
,float glPrec
,float gross
,float refLength
);
Setup the level of recursivity in triangle calculation, depending on the current zoom level.
map |
a VisuMap object. |
|
glPrec |
the global OpenGL precision for drawing (default is 1.). |
|
gross |
current zoom level. |
|
refLength |
a reference length (see |
Since: 3.6
gboolean visu_map_setLines (VisuMap *map
,guint nIsoLines
,float minmax[2]
);
Calculate nIsoLines
equally distributed in minmax
.
map |
a VisuMap object. |
|
nIsoLines |
number of required isolines. |
|
minmax |
span for isoline values. |
Since: 3.6
gboolean visu_map_setScaling (VisuMap *map
,ToolMatrixScalingFlag scale
);
The scaling algorithm to transform input values into [0;1] is
defined by scale
.
Since: 3.8
gboolean visu_map_setScalingRange (VisuMap *map
,const float *minMax
);
If minMax
is provided, these values are used to scale the values
of field
to [0;1], otherwise the minMax values of the field itself
are used.
map |
a VisuMap object. |
|
minMax |
two floats defining a range for input scaling. |
[allow-none][array fixed-size=2] |
Since: 3.8
void
visu_map_compute_sync (VisuMap *map
);
For later use. Currently computation of maps is always synchronous.
Since: 3.8
VisuPlane *
visu_map_getPlane (VisuMap *map
);
Retrieves the plane map
is based on.
Since: 3.7
VisuScalarField *
visu_map_getField (VisuMap *map
);
Retrieves the field map
is projected from.
Since: 3.8
gboolean visu_map_getScaledMinMax (const VisuMap *map
,float minMax[2]
);
After map
has been computed, one can access
the scaled min and max values represented in the map. For
field values, see visu_map_getFieldMinMax()
.
map |
a VisuMap object. |
|
minMax |
two float location. |
[out caller-allocates][array fixed-size=2] |
Since: 3.6
float *
visu_map_getFieldMinMax (VisuMap *map
);
After map
has been computed, one can access
the min and max values of the field as represented in the map. For
scaled values, see visu_map_getScaledMinMax()
.
Since: 3.6
const float *
visu_map_getScalingRange (const VisuMap *map
);
Retrieves the min and max values used to scale the data in map
.
Since: 3.8
float
visu_map_getLegendScale ();
Retrieve information about the static legend attached to maps.
Since: 3.7
float
visu_map_getLegendPosition (ToolXyzDir dir
);
Retrieve information about the static legend attached to maps.
Since: 3.7
void visu_map_draw (VisuMap *map
,float prec
,ToolShade *shade
,float *rgb
,gboolean alpha
);
It draws the map
with the given shade
. prec
give the level of
refinement used to draw the map, 100 means normal and 200 means
twice smaller level. If rgb
is present, this colour is used for
possible isolines. If alpha
is TRUE, an alpha channel is added as
a linear variation of the value of each vertex.
Since: 3.6
gboolean visu_map_export (VisuMap *map
,const ToolShade *shade
,const float *rgb
,float precision
,const gchar *filename
,VisuMapExportFormat format
,GError **error
);
Export the given map to the format
, using the shade
color. If
rgb
is provided and map
has some isolines, they will be drawn
with this colour, otherwise an inverse colour is used.
Since: 3.6
“range-min-max”
property“range-min-max” GArray *
min / max range to normalise data.
Flags: Read / Write
“scale”
property“scale” guint
scaling scheme of input values.
Flags: Read / Write
Allowed values: <= 2
Default value: 0