v_sim.Interactive

g GObject.Object GObject.Object v_sim.Interactive v_sim.Interactive GObject.Object->v_sim.Interactive

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

v_sim.InteractiveClass (2), GObject.ObjectClass (5)

class

getPreferedObserveMethod ()

class

new (type)

class

setPreferedObserveMethod (method)

getEvent ()

getMessage ()

getSavedCameras ()

getType ()

handleEvent (view, ev)

highlight (nodeId)

popSavedCamera ()

pushSavedCamera (camera)

setMessage (message)

setMovingAxe (axe)

setMovingNodes (nodeIds)

setNodeList (nodes)

setReferences (from_)

setType (id)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

menu

This signal is emitted each time a menu key stroke is done.

move

This signal is emitted each time a set of nodes are moved.

node-selection

This signal is emitted each time a single node selection succeed, providing the kind in kind (see v_sim.InteractivePick).

observe

This signal is emitted each time an observe session is start (bool is True) or finished (bool is False).

region-selection

This signal is emitted each time a region selection succeed.

selection-error

This signal is emitted each time a selection fails, providing the error in err (see v_sim.InteractivePickError).

start-move

This signal is emitted each time a set of nodes are clicked to be moved.

stop

This signal is emitted each time a set of nodes are stopped to be moved.

stop-move

This signal is emitted when a set of nodes are finished moving.

Fields

Inherited:

GObject.Object (1)

Class Details

class v_sim.Interactive(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

v_sim.InteractiveClass

All fields are private.

classmethod getPreferedObserveMethod()
Returns:

an integer that identify the method, see #OPENGL_OBSERVE_CONSTRAINED, and #OPENGL_OBSERVE_WALKER flags.

Return type:

v_sim.InteractiveMethod

There are two methods to move the camera in a pick and observe sesion. These two methods are described in the commentary of the keys #OPENGL_OBSERVE_CONSTRAINED an d#OPENGL_OBSERVE_WALKER.

classmethod new(type)
Parameters:

type (v_sim.InteractiveId) – a v_sim.InteractiveId flag.

Returns:

a newly created object.

Return type:

v_sim.Interactive

Creates a new interactive session of the given type.

classmethod setPreferedObserveMethod(method)
Parameters:

method (v_sim.InteractiveMethod) – an integer that identify the method, see #OPENGL_OBSERVE_CONSTRAINED, and #OPENGL_OBSERVE_WALKER flags.

There are two methods to move the camera in a pick and observe sesion. These two methods are described in the commentary of the keys #OPENGL_OBSERVE_CONSTRAINED an d#OPENGL_OBSERVE_WALKER.

getEvent()
Returns:

a location with details on the last event.

Return type:

v_sim.SimplifiedEvents

This routine can be called in callbacks of self to get some details about the event that raise signals like v_sim.Interactive ::node-selection.

New in version 3.7.

getMessage()
Returns:

a message.

Return type:

str

Retrieves the message associated to self.

New in version 3.8.

getSavedCameras()
Returns:

cameras:

a location to store a list of cameras.

head:

a location to store a list of cameras.

Return type:

(cameras: [v_sim.GlCamera], head: [v_sim.GlCamera])

self object stores camera settings as a ring. One can access the set of saved cameras thanks to cameras or to the current position in the ring thanks to head. cameras or head are not copied and are owned by V_Sim. They should be considered read-only.

New in version 3.6.

getType()
Returns:

a v_sim.InteractiveId value.

Return type:

v_sim.InteractiveId

It returns the kind of interactive session.

handleEvent(view, ev)
Parameters:

This routine should be called by the rendering window when some event is raised on the rendering surface.

highlight(nodeId)
Parameters:

nodeId (int) – a node id.

This routine simulates an highlight action on nodeId. This triggers the signal v_sim.Interactive ::node-selection, or v_sim.Interactive ::selection-error if nodeId is invalid.

New in version 3.7.

popSavedCamera()
Returns:

a pointer to the previously current v_sim.GlCamera. It is owned by V_Sim and should not be touched.

Return type:

v_sim.GlCamera

self object stores camera settings as a ring. This routine goes to the next camera in the ring and returns the current one. The popped camera is not actually removed from the ring.

New in version 3.6.

pushSavedCamera(camera)
Parameters:

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

self object stores camera settings as a ring. The given camera is copied in the ring if its values not already exist. The current camera is set to this new one.

New in version 3.6.

setMessage(message)
Parameters:

message (str) – some text.

Set a describing message to be shown when self is used.

New in version 3.8.

setMovingAxe(axe)
Parameters:

axe (float) – a direction.

Defines the axe that can be used to move along if self is a move action session.

setMovingNodes(nodeIds)
Parameters:

nodeIds ([int] or None) – a list of node ids.

Defines the nodes that should be moved if self is a move action session. The list is actually copied.

setNodeList(nodes)
Parameters:

nodes (v_sim.GlExtNodes or None) – a v_sim.GlExtNodes object.

Associate a v_sim.GlExtNodes object for node selection. This is mandatory for move, pick and mark actions.

New in version 3.7.

setReferences(from_)
Parameters:

from (v_sim.Interactive) – another v_sim.Interactive object.

Copies all node ids used as reference from from to self.

setType(id)
Parameters:

id (v_sim.InteractiveId) – a v_sim.InteractiveId.

Returns:

True if indeed changed.

Return type:

bool

It changes the kind of interactive session.

Signal Details

v_sim.Interactive.signals.menu(interactive, x, y, node)
Signal Name:

menu

Flags:

RUN_LAST, NO_RECURSE

Parameters:

This signal is emitted each time a menu key stroke is done.

New in version 3.7.

v_sim.Interactive.signals.movemove(*fixme)
Signal Name:

move

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

(FIXME pgi-docgen: arguments are missing here)

This signal is emitted each time a set of nodes are moved. The corresponding movement translation is stored in delta.

New in version 3.6.

v_sim.Interactive.signals.node_selection(interactive, kind, array, node1, node2, node3)
Signal Name:

node-selection

Flags:

RUN_LAST, NO_RECURSE

Parameters:

This signal is emitted each time a single node selection succeed, providing the kind in kind (see v_sim.InteractivePick). The corresponding nodes are stored in node1, node2 and node3.

New in version 3.6.

v_sim.Interactive.signals.observe(interactive, bool)
Signal Name:

observe

Flags:

RUN_LAST, NO_RECURSE

Parameters:

This signal is emitted each time an observe session is start (bool is True) or finished (bool is False).

New in version 3.6.

v_sim.Interactive.signals.region_selection(interactive, nodes)
Signal Name:

region-selection

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:
  • interactive (v_sim.Interactive) – The object which received the signal

  • nodes ([int]) – an array of node ids.

This signal is emitted each time a region selection succeed. The corresponding nodes are stored in nodes.

New in version 3.6.

v_sim.Interactive.signals.selection_error(interactive, err)
Signal Name:

selection-error

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:
  • interactive (v_sim.Interactive) – The object which received the signal

  • err (int) – an error value.

This signal is emitted each time a selection fails, providing the error in err (see v_sim.InteractivePickError).

New in version 3.6.

v_sim.Interactive.signals.start_move(interactive, nodes)
Signal Name:

start-move

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:
  • interactive (v_sim.Interactive) – The object which received the signal

  • nodes ([int]) – an array of node ids.

This signal is emitted each time a set of nodes are clicked to be moved. The corresponding nodes are stored in nodes.

New in version 3.6.

v_sim.Interactive.signals.stop(interactive)
Signal Name:

stop

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:

interactive (v_sim.Interactive) – The object which received the signal

This signal is emitted each time a set of nodes are stopped to be moved.

New in version 3.6.

v_sim.Interactive.signals.stop_movestop_move(*fixme)
Signal Name:

stop-move

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

(FIXME pgi-docgen: arguments are missing here)

This signal is emitted when a set of nodes are finished moving. The corresponding movement complete translation is stored in delta.

New in version 3.8.