v_sim.Interactive¶
- Subclasses:
 None
Methods¶
- Inherited:
 - Structs:
 
class  | 
|
class  | 
  | 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
Properties¶
None
Signals¶
- Inherited:
 
Name  | 
Short Description  | 
|---|---|
This signal is emitted each time a menu key stroke is done.  | 
|
  | 
This signal is emitted each time a set of nodes are moved.  | 
This signal is emitted each time a single node selection succeed, providing the kind in kind (see   | 
|
This signal is emitted each time an observe session is start (bool is   | 
|
This signal is emitted each time a region selection succeed.  | 
|
This signal is emitted each time a selection fails, providing the error in err (see   | 
|
This signal is emitted each time a set of nodes are clicked to be moved.  | 
|
This signal is emitted each time a set of nodes are stopped to be moved.  | 
|
  | 
This signal is emitted when a set of nodes are finished moving.  | 
Fields¶
- Inherited:
 
Class Details¶
- class v_sim.Interactive(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
All fields are private.
- classmethod getPreferedObserveMethod()¶
 - Returns:
 an integer that identify the method, see #OPENGL_OBSERVE_CONSTRAINED, and #OPENGL_OBSERVE_WALKER flags.
- Return type:
 
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) – av_sim.InteractiveIdflag.- Returns:
 a newly created object.
- Return type:
 
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:
 
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:
 
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.InteractiveIdvalue.- Return type:
 
It returns the kind of interactive session.
- handleEvent(view, ev)¶
 - Parameters:
 view (
v_sim.GlView) – av_sim.GlViewobject the interaction happened on.ev (
v_sim.SimplifiedEvents) – a simplified event.
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, orv_sim.Interactive::selection-errorif 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:
 
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) – av_sim.GlCameraobject.
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)¶
 - 
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.GlExtNodesorNone) – av_sim.GlExtNodesobject.
Associate a
v_sim.GlExtNodesobject for node selection. This is mandatory for move, pick and mark actions.New in version 3.7.
- setReferences(from_)¶
 - Parameters:
 from (
v_sim.Interactive) – anotherv_sim.Interactiveobject.
Copies all node ids used as reference from from to self.
- setType(id)¶
 - Parameters:
 id (
v_sim.InteractiveId) – av_sim.InteractiveId.- Returns:
 Trueif indeed changed.- Return type:
 
It changes the kind of interactive session.
Signal Details¶
- Signal Name:
 menu- Flags:
 - Parameters:
 interactive (
v_sim.Interactive) – The object which received the signalx (
int) – the x coordinate.y (
int) – the y coordinate.node (
v_sim.NodeorNone) – av_sim.Node.
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:
 
(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:
 - Parameters:
 interactive (
v_sim.Interactive) – The object which received the signalkind (
int) – a flag, seev_sim.InteractivePick.array (
v_sim.NodeArray) – thev_sim.NodeArrayhosting node1, node2 and node3.node1 (
v_sim.Node) – the primary node.node2 (
v_sim.Node) – the secondary node, if any.node3 (
v_sim.Node) – the tertiary node, if any.
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:
 - Parameters:
 interactive (
v_sim.Interactive) – The object which received the signalbool (
bool) – a boolean.
This signal is emitted each time an observe session is start (bool is
True) or finished (bool isFalse).New in version 3.6.
- v_sim.Interactive.signals.region_selection(interactive, nodes)¶
 - Signal Name:
 region-selection- Flags:
 - Parameters:
 interactive (
v_sim.Interactive) – The object which received the signalnodes ([
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:
 - Parameters:
 interactive (
v_sim.Interactive) – The object which received the signalerr (
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:
 - Parameters:
 interactive (
v_sim.Interactive) – The object which received the signalnodes ([
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:
 - 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:
 
(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.