v_sim.GlNodeScene

g GObject.GInterface GObject.GInterface v_sim.Boxed v_sim.Boxed GObject.GInterface->v_sim.Boxed GObject.Object GObject.Object v_sim.Gl v_sim.Gl GObject.Object->v_sim.Gl v_sim.GlNodeScene v_sim.GlNodeScene v_sim.Boxed->v_sim.GlNodeScene v_sim.GlExtSet v_sim.GlExtSet v_sim.Gl->v_sim.GlExtSet v_sim.GlExtSet->v_sim.GlNodeScene

Subclasses:

None

Methods

Inherited:

v_sim.GlExtSet (8), v_sim.Gl (42), GObject.Object (37), v_sim.Boxed (2)

Structs:

GObject.ObjectClass (5)

class

new ()

addMaps ()

addMasker (masker)

addMover (mover)

addPlanes ()

addSurfaces ()

applyCLI ()

clearPaths ()

colorizeFragments ()

colorizeShell (nodeId)

dump (format, fileName, width, height, functionWait, *data)

exportPathsToXML (filename)

getAxes ()

getBgImage ()

getBox ()

getBoxLegend ()

getColorization ()

getColorizationLegend ()

getData ()

getForces ()

getFragmentColorizer ()

getGeometryDifferences ()

getGlView ()

getInfos ()

getLegend ()

getMarkActive (nodeId)

getMarks ()

getNodes ()

getPairs ()

getScales ()

getVibrations ()

loadData (loadable, iSet, cancel)

marksToFile (filename)

parsePathsFromXML (filename)

removeMarks ()

removeMasker (masker)

removeMover (mover)

setColorization (dt)

setColorizationPolicy (policy)

setData (data)

setDiffFromData (dataRef)

setDiffFromLoadable (ref)

setGlCamera (camera)

setMark (nodeId, status)

setMarksFromFile (filename)

Virtual Methods

Inherited:

v_sim.GlExtSet (2), v_sim.Gl (4), GObject.Object (7), v_sim.Boxed (1)

Properties

Inherited:

v_sim.Gl (18), v_sim.Boxed (2)

Name

Type

Flags

Short Description

axes-from-box

bool

r/w

axes follow the data super-cell.

colorization-file-extension

str

r/w

extension used to discover colourisation file.

colorization-policy

int

r/w

colorization load policy.

data

v_sim.Data

r/w

storing data for nodes

geometry-differences

bool

r/w

display arrows to represent differences

loading

bool

r

flag indicating that data are loading.

loading-message

str

r

message when loading.

path-active

bool

r/w/c

display stored paths

path-length

int

r

store the path length

path-shade

v_sim.Shade

r/w

store the path shade

record-path

bool

r/w/c

save differences between data

reorder-reference

bool

r/w/c

reorder reference data before comparing

shell-colorizer

v_sim.DataColorizerFragment

r

used to colorize neighbouring shells.

view

v_sim.GlView

r

storing the view to represent the data

Signals

Inherited:

v_sim.Gl (1), GObject.Object (1), v_sim.Boxed (2)

Fields

Inherited:

v_sim.Gl (1), GObject.Object (1), v_sim.Boxed (2)

Name

Type

Access

Description

parent

v_sim.GlExtSet

r

Class Details

class v_sim.GlNodeScene(**kwargs)
Bases:

v_sim.GlExtSet, v_sim.Boxed

Abstract:

No

Structure:

v_sim.GlNodeSceneClass

Common name to refer to a #_VisuGlNodeScene.

classmethod new()
Returns:

a newly created v_sim.GlNodeScene object.

Return type:

v_sim.GlNodeScene

Create an object to handle a set of v_sim.GlExt objects and draw them together.

Added in version 3.8.

addMaps()
Returns:

a v_sim.GlExtMapSet object.

mapLegend:

a pointer to retrieve the associated v_sim.GlExtShade legend of the coloured map.

Return type:

(v_sim.GlExtMapSet, mapLegend: v_sim.GlExtShade)

Add or retrieve the v_sim.GlExtMapSet object used by self to render maps.

Added in version 3.8.

addMasker(masker)
Parameters:

masker (v_sim.NodeMasker) – a v_sim.NodeMasker object.

Returns:

False if masker already exists.

Return type:

bool

Add masker to self, so when masker is modified, v_sim.Node of self are hidden accordingly.

Added in version 3.8.

addMover(mover)
Parameters:

mover (v_sim.NodeMover) – a v_sim.NodeMover object.

Returns:

False if mover already exists.

Return type:

bool

Add mover to self.

Added in version 3.8.

addPlanes()
Returns:

a v_sim.GlExtPlanes object.

Return type:

v_sim.GlExtPlanes

Add or retrieve the v_sim.GlExtPlanes object used by self to render planes.

Added in version 3.8.

addSurfaces()
Returns:

a v_sim.GlExtSurfaces object.

Return type:

v_sim.GlExtSurfaces

Add or retrieve the v_sim.GlExtSurfaces object used by self to render surfaces.

Added in version 3.8.

applyCLI()
Raises:

GLib.Error

Returns:

True if complete without error.

Return type:

bool

Call all the get methods on the command line options to tune the given data.

clearPaths()

Remove any v_sim.Paths from self.

Added in version 3.8.

colorizeFragments()
Returns:

the associated v_sim.DataColorizerFragment object.

Return type:

v_sim.DataColorizerFragment

Apply colorization depending on fragments if they are defined.

Added in version 3.8.

colorizeShell(nodeId)
Parameters:

nodeId (int) – a node id.

Returns:

the v_sim.DataColorizerFragment used for the colorization.

Return type:

v_sim.DataColorizerFragment

Apply colorization depending on neighbouring shell of nodeId.

Added in version 3.8.

dump(format, fileName, width, height, functionWait, *data)
Parameters:
  • format (v_sim.Dump) – a v_sim.Dump object, corresponding to the write method ;

  • fileName (str) – a string that defined the file to write to ;

  • width (int) – an integer, or 0 for current ;

  • height (int) – an integer, or 0 for current ;

  • functionWait (v_sim.VoidDataFunc or None) – a method to call periodically during the dump ;

  • data (object or None) – some pointer on object to be passed to the wait function.

Raises:

GLib.Error

Returns:

True if everything went right.

Return type:

bool

Call this method to dump the given self to a file. There must be a current OpenGL context before calling this method. For off-screen rendering a context can be created with v_sim.GlExtSet.initOffscreenContext(). If it’s just to dump the content of the rendering window, one can directly use v_sim.UiRenderingWindow.dump().

exportPathsToXML(filename)
Parameters:

filename (str) – a filename.

Raises:

GLib.Error

Returns:

True on success.

Return type:

bool

If self has some v_sim.Paths, it exports them to an XML file defined by filename.

Added in version 3.8.

getAxes()
Returns:

a v_sim.GlExtAxes object.

Return type:

v_sim.GlExtAxes

Retrieve the v_sim.GlExtAxes object used by self to render axes.

Added in version 3.8.

getBgImage()
Returns:

a v_sim.GlExtBg object.

Return type:

v_sim.GlExtBg

Retrieve the v_sim.GlExtBg object used by self to render images on the background.

Added in version 3.8.

getBox()
Returns:

a v_sim.GlExtBox object.

Return type:

v_sim.GlExtBox

Retrieve the v_sim.GlExtBox object used by self to render the box.

Added in version 3.8.

getBoxLegend()
Returns:

a v_sim.GlExtBoxLegend object.

Return type:

v_sim.GlExtBoxLegend

Retrieve the v_sim.GlExtBoxLegend object used by self to render the lgened of the box.

Added in version 3.8.

getColorization()
Returns:

a v_sim.Colorization object, or None.

Return type:

v_sim.Colorization

The attached v_sim.Colorization object, if any.

Added in version 3.8.

getColorizationLegend()
Returns:

a v_sim.GlExtShade.

Return type:

v_sim.GlExtShade

Retrieve the v_sim.GlExtShade object, used to represent the color variation of an attached v_sim.Colorization object. The returned object is created if none already exists.

Added in version 3.8.

getData()
Returns:

a v_sim.Data object.

Return type:

v_sim.Data

Retrives the v_sim.Data represented by v_sim.GlNodeScene.

Added in version 3.8.

getForces()
Returns:

a v_sim.GlExtForces object.

Return type:

v_sim.GlExtForces

Retrieve the v_sim.GlExtForces object used by self to render forces.

Added in version 3.8.

getFragmentColorizer()
Returns:

the default v_sim.DataColorizerFragment.

Return type:

v_sim.DataColorizerFragment

Retrieves the default fragment colorizer object of self.

Added in version 3.8.

getGeometryDifferences()
Returns:

a v_sim.GlExtGeodiff object.

Return type:

v_sim.GlExtGeodiff

Retrieve the v_sim.GlExtGeodiff used to draw geometry differences.

Added in version 3.8.

getGlView()
Returns:

a v_sim.GlView object.

Return type:

v_sim.GlView

Retrieves the v_sim.GlView used by self to render nodes.

Added in version 3.8.

getInfos()
Returns:

a v_sim.GlExtInfos object.

Return type:

v_sim.GlExtInfos

Retrieves the v_sim.GlExtInfos object used by self to display info on nodes.

Added in version 3.8.

getLegend()
Returns:

a v_sim.GlExtLegend object.

Return type:

v_sim.GlExtLegend

Retrieve the v_sim.GlExtLegend object used by self to render the node legend.

Added in version 3.8.

getMarkActive(nodeId)
Parameters:

nodeId (int) – a node id.

Returns:

True if nodeId has some marks on it.

Return type:

bool

Tests if nodeId from self has some marks on it.

Added in version 3.8.

getMarks()
Returns:

a v_sim.GlExtMarks object.

Return type:

v_sim.GlExtMarks

Retrieve the v_sim.GlExtMarks object used by self to render marks.

Added in version 3.8.

getNodes()
Returns:

a v_sim.GlExtNodes object.

Return type:

v_sim.GlExtNodes

Retrieve the v_sim.GlExtNodes object used by self to render nodes.

Added in version 3.8.

getPairs()
Returns:

a v_sim.GlExtPairs object.

Return type:

v_sim.GlExtPairs

Retrieve the v_sim.GlExtPairs object used by self to render pairs.

Added in version 3.8.

getScales()
Returns:

a v_sim.GlExtScale object.

Return type:

v_sim.GlExtScale

Retrieve the v_sim.GlExtScale object used by self to render scales.

Added in version 3.8.

getVibrations()
Returns:

the attached v_sim.GlExtVibrations, owned by V_Sim.

Return type:

v_sim.GlExtVibrations

Retrieves the associated v_sim.GlExtVibrations used to represent periodic displacements of nodes.

Added in version 3.8.

loadData(loadable, iSet, cancel)
Parameters:
Raises:

GLib.Error

Returns:

True on success.

Return type:

bool

A convenience function that tries to load loadable, see v_sim.DataLoadable.load(). On success, loadable is associated to self, see v_sim.GlNodeScene.setData().

Added in version 3.8.

marksToFile(filename)
Parameters:

filename (str) – a path.

Raises:

GLib.Error

Returns:

False if an error occured.

Return type:

bool

Export the current selection and marks into filename.

Added in version 3.8.

parsePathsFromXML(filename)
Parameters:

filename (str) – a filename.

Raises:

GLib.Error

Returns:

True on success.

Return type:

bool

Try to parse filename to load some v_sim.Paths into self.

Added in version 3.8.

removeMarks()

Remove all marks on self.

Added in version 3.8.

removeMasker(masker)
Parameters:

masker (v_sim.NodeMasker) – a v_sim.NodeMasker object.

Returns:

True on successful removal.

Return type:

bool

Remove masker from the list of objects that may hide nodes in self.

Added in version 3.8.

removeMover(mover)
Parameters:

mover (v_sim.NodeMover) – a v_sim.NodeMover object.

Returns:

True on successful removal.

Return type:

bool

Remove mover from the list of objects that may move nodes in self.

Added in version 3.8.

setColorization(dt)
Parameters:

dt (v_sim.Colorization or None) – a v_sim.Colorization object.

Returns:

True if value is actually changed.

Return type:

bool

Associates dt with self to colorize nodes.

Added in version 3.8.

setColorizationPolicy(policy)
Parameters:

policy (v_sim.GlNodeSceneColorizationPolicies) – a v_sim.GlNodeSceneColorizationPolicies value.

Returns:

True if value is actually changed.

Return type:

bool

Specifies how the colorization should be modified when a new v_sim.Data is associated to self.

Added in version 3.8.

setData(data)
Parameters:

data (v_sim.Data) – a v_sim.Data object.

Returns:

True if the view actually change.

Return type:

bool

Apply the given view on all v_sim.GlExt objects stored in set.

Added in version 3.8.

setDiffFromData(dataRef)
Parameters:

dataRef (v_sim.Data) – a v_sim.Data object.

Creates a v_sim.DataDiff from the current v_sim.Data and dataRef. If the scene is in recording mode (see “record-path” property), the difference is appended to the current path.

Added in version 3.8.

setDiffFromLoadable(ref)
Parameters:

ref (v_sim.DataLoadable) – a v_sim.Data object.

Raises:

GLib.Error

Returns:

True on success.

Return type:

bool

Same as v_sim.GlNodeScene.setDiffFromData(), but load first ref before doing the difference.

Added in version 3.8.

setGlCamera(camera)
Parameters:

camera (v_sim.GlCamera) – a v_sim.GlCamera object.

A convenience function to change the view all at once with animations.

Added in version 3.8.

setMark(nodeId, status)
Parameters:
  • nodeId (int) – a node id.

  • status (bool) – a boolean.

Returns:

True if nodeId mark status changed.

Return type:

bool

xlib.Display or removes marks on nodeId, depending on status.

Added in version 3.8.

setMarksFromFile(filename)
Parameters:

filename (str) – a filename

Raises:

GLib.Error

Returns:

True on success.

Return type:

bool

Try to parse filename and put marks on nodes of self accordingly.

Added in version 3.8.

Property Details

v_sim.GlNodeScene.props.axes_from_box
Name:

axes-from-box

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

axes follow the data super-cell.

v_sim.GlNodeScene.props.colorization_file_extension
Name:

colorization-file-extension

Type:

str

Default Value:

'.dat'

Flags:

READABLE, WRITABLE

extension used to discover colourisation file.

v_sim.GlNodeScene.props.colorization_policy
Name:

colorization-policy

Type:

int

Default Value:

2

Flags:

READABLE, WRITABLE

colorization load policy.

v_sim.GlNodeScene.props.data
Name:

data

Type:

v_sim.Data

Default Value:

None

Flags:

READABLE, WRITABLE

storing data for nodes

v_sim.GlNodeScene.props.geometry_differences
Name:

geometry-differences

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

display arrows to represent differences

v_sim.GlNodeScene.props.loading
Name:

loading

Type:

bool

Default Value:

False

Flags:

READABLE

flag indicating that data are loading.

v_sim.GlNodeScene.props.loading_message
Name:

loading-message

Type:

str

Default Value:

''

Flags:

READABLE

message when loading.

v_sim.GlNodeScene.props.path_active
Name:

path-active

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

display stored paths

v_sim.GlNodeScene.props.path_length
Name:

path-length

Type:

int

Default Value:

0

Flags:

READABLE

store the path length

v_sim.GlNodeScene.props.path_shade
Name:

path-shade

Type:

v_sim.Shade

Default Value:

None

Flags:

READABLE, WRITABLE

store the path shade

v_sim.GlNodeScene.props.record_path
Name:

record-path

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

save differences between data

v_sim.GlNodeScene.props.reorder_reference
Name:

reorder-reference

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

reorder reference data before comparing

v_sim.GlNodeScene.props.shell_colorizer
Name:

shell-colorizer

Type:

v_sim.DataColorizerFragment

Default Value:

None

Flags:

READABLE

used to colorize neighbouring shells.

v_sim.GlNodeScene.props.view
Name:

view

Type:

v_sim.GlView

Default Value:

None

Flags:

READABLE

storing the view to represent the data