v_sim.Map¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
projection field |
||
r/w |
projection plane |
||
r/w |
min / max range to normalise data |
||
r/w |
scaling scheme of input values |
||
r/w |
projection surface |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
This signal is emitted each time the map has been changed and recomputed. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
||
priv |
r |
Class Details¶
- class v_sim.Map(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Common name to refer to a #_VisuMap.
- classmethod getLegendPosition(dir)¶
- Parameters:
dir (
v_sim.XyzDir) –v_sim.XyzDir.Xorv_sim.XyzDir.Y- Returns:
the static legend position on screen in reduced coordinates.
- Return type:
Retrieve information about the static legend attached to maps.
New in version 3.7.
- classmethod getLegendScale()¶
- Returns:
the scale factor of the static legend associated to maps.
- Return type:
Retrieve information about the static legend attached to maps.
New in version 3.7.
- classmethod new_fromPlane(plane)¶
- Parameters:
plane (
v_sim.Plane) – av_sim.Planeobject.- Returns:
a newly created
v_sim.Mapobject.- Return type:
Creates a new
v_sim.Mapobject, projected on plane.New in version 3.6.
- compute_sync()¶
For later use. Currently computation of maps is always synchronous.
New in version 3.8.
- draw(prec, shade, rgb, alpha)¶
- Parameters:
prec (
float) – a pourcentage value.shade (
v_sim.Shade) – av_sim.Shadeobject.alpha (
bool) – a boolean.
It draws the self 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.New in version 3.6.
- export(shade, rgb, precision, filename, format)¶
- Parameters:
shade (
v_sim.Shade) – av_sim.Shadeobject.precision (
float) – a pourcentage for rendering quality.filename (
str) – the location to export to.format (
v_sim.MapExportFormat) – the kind of format.
- Raises:
- Returns:
Trueif no error.- Return type:
Export the given map to the format, using the shade color. If rgb is provided and self has some isolines, they will be drawn with this colour, otherwise an inverse colour is used.
New in version 3.6.
- getField()¶
- Returns:
a
v_sim.ScalarFieldorNone.- Return type:
Retrieves the field self is projected from.
New in version 3.8.
- getFieldMinMax()¶
- Returns:
two floats being the min and the max.
- Return type:
After self has been computed, one can access the min and max values of the field as represented in the map. For scaled values, see
v_sim.Map.getScaledMinMax().New in version 3.6.
- getPlane()¶
- Returns:
a
v_sim.PlaneorNone.- Return type:
v_sim.PlaneorNone
Retrieves the plane self is based on.
New in version 3.7.
- getScaledMinMax()¶
- Returns:
Trueif the map has been computed and minMax has valid values.- minMax:
two float location.
- Return type:
After self has been computed, one can access the scaled min and max values represented in the map. For field values, see
v_sim.Map.getFieldMinMax().New in version 3.6.
- getScalingRange()¶
- Returns:
a min / max range.
- Return type:
[
float]
Retrieves the min and max values used to scale the data in self.
New in version 3.8.
- setField(field)¶
- Parameters:
field (
v_sim.ScalarField) – av_sim.ScalarFieldobject.- Returns:
Trueif field is changed.- Return type:
It associates the values of field to self.
New in version 3.6.
- setLevel(glPrec, gross, refLength)¶
- Parameters:
glPrec (
float) – the global OpenGL precision for drawing (default is 1.).gross (
float) – current zoom level.refLength (
float) – a reference length (seev_sim.GlCamera.getRefLength()).
- Returns:
Trueif the level is actually changed.- Return type:
Setup the level of recursivity in triangle calculation, depending on the current zoom level.
New in version 3.6.
- setLines(nIsoLines, minmax)¶
- Parameters:
- Returns:
Trueif lines are successfully calculated.- Return type:
Calculate nIsoLines equally distributed in minmax.
New in version 3.6.
- setPlane(plane)¶
- Parameters:
plane (
v_sim.PlaneorNone) – av_sim.Planeobject.- Returns:
Trueif internal plane is changed.- Return type:
Set the internal
v_sim.Planeof self to plane. All changed to plane will be automatically propagated to self. Usev_sim.Map.setField() to choose the field to take values from, set the level precision withv_sim.Map.setLevel().New in version 3.7.
- setScaling(scale)¶
- Parameters:
scale (
v_sim.MatrixScalingFlag) – a flag.- Returns:
Trueif scale is changed.- Return type:
The scaling algorithm to transform input values into [0;1] is defined by scale.
New in version 3.8.
- setScalingRange(minMax)¶
- Parameters:
minMax ([
float] orNone) – two floats defining a range for input scaling.- Returns:
Trueif minMax is changed.- Return type:
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.
New in version 3.8.
- setSurface(surface)¶
- Parameters:
surface (
v_sim.SurfaceorNone) – av_sim.Surfaceobject.- Returns:
Trueif internal surface is changed.- Return type:
Set the internal
v_sim.Surfaceof self to surface. All changed to surface will be automatically propagated to self. Usev_sim.Map.setField() to choose the field to take values from, set the level precision withv_sim.Map.setLevel().New in version 3.8.
Signal Details¶
Property Details¶
- v_sim.Map.props.field¶
- Name:
field- Type:
- Default Value:
- Flags:
projection field
- v_sim.Map.props.plane¶
- Name:
plane- Type:
- Default Value:
- Flags:
projection plane
- v_sim.Map.props.range_min_max¶
- Name:
range-min-max- Type:
- Default Value:
- Flags:
min / max range to normalise data
- v_sim.Map.props.scale¶
-
scaling scheme of input values
- v_sim.Map.props.surface¶
- Name:
surface- Type:
- Default Value:
- Flags:
projection surface