Navigation and Viewing Framework
Configurable navigation and viewing setups for various display types in the VR lab
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lib-server.Navigation.Navigation Class Reference

Wrapper class to create an input Device, a GroundFollowing instance, an InputMapping and a Platform. More...

Inheritance diagram for lib-server.Navigation.Navigation:

Public Member Functions

def __init__
 Default constructor. More...
 
def my_constructor
 Custom constructor. More...
 
def reset
 Resets the platform's matrix to the initial value. More...
 
def activate_realistic_mode
 Activates 3-DOF (realistic) navigation mode. More...
 
def animate_dofchange
 Animates the removal of pitch and roll angles when switching from 6-DOF (unrealistic) to 3-DOF (realistic) navigation mode. More...
 
def deactivate_realistic_mode
 Activates 6-DOF (unrealistic) navigation mode. More...
 
def couple_navigation
 Bidirectional coupling of this and another navigation. More...
 
def decouple_navigation
 Bidirectional decoupling of this and another navigation. More...
 
def trigger_coupling
 Triggers the coupling mechanism. More...
 
def set_coupling_animation_settings
 Sets all the necessary attributes to perform a lerp and slerp animation to another navigation. More...
 
def animate_coupling
 Animates the movement to another platform during the coupling process. More...
 
def clear_couplings
 Decouples this Navigation from all coupled Navigations. More...
 
def trigger_dofchange
 Switches from realistic to unrealistic or from unrealistic to realistic mode on this and all other coupled instances. More...
 
def get_current_world_pos
 Computes the current world position of the rotation center on the platform ground (y = 0). More...
 
def evaluate
 Evaluated every frame. More...
 
def sf_reset_trigger_changed
 Evaluated when value changes. More...
 
def sf_coupling_trigger_changed
 Evaluated when value changes. More...
 
def sf_dof_trigger_changed
 Evaluated when value changes. More...
 

Public Attributes

 trace_material
 The material to be used for the movement traces. More...
 
 SCENEGRAPH
 Reference to the scenegraph. More...
 
 NET_TRANS_NODE
 Reference to the net matrix node in the scenegraph for distribution. More...
 
 coupled_navigations
 List of coupled Navigation instances to which this Navigation's changes are forwarded to. More...
 
 input_sensor_type
 String indicating the type of input device to be created, e.g. More...
 
 input_sensor_name
 Name of the input device sensor as chosen in daemon. More...
 
 start_matrix
 Initial position matrix of the platform. More...
 
 device
 Device instance handling relative inputs of physical device. More...
 
 groundfollowing
 GroundFollowing instance to correct the absolute matrices with respect to gravity. More...
 
 inputmapping
 InputMapping instance to process and map relative device inputs to an absolute matrix. More...
 
 platform
 Platform instance that is controlled by the Device. More...
 
 NAVIGATION_LIST
 Reference to a list containing all Navigation instances in the setup. More...
 
 in_dofchange_animation
 Boolean variable to indicate if a movement animation for a DOF change (realistic/unrealistic) is in progress. More...
 
 in_coupling_animation
 Boolean variable to indicate if a movement animation for coupling is in progress. More...
 
 timer
 Instance of TimeSensor to handle the duration of animations. More...
 
 ANIMATE_COUPLING
 Boolean indicating if an animation should be done when a coupling of navigations is initiated. More...
 
 movement_traces
 Boolean indicating if the movement traces are currently visualized by line segments. More...
 
 movement_traces_activated
 Boolean indicating if the movement traces are generally activated. More...
 
 trace
 The trace class that handles the line segment updating. More...
 
 start_rot
 Quaternion representing the start rotation of the animation. More...
 
 target_rot
 Quaternion representing the target rotation of the animation. More...
 
 animation_time
 Time of the rotation animation in relation to the rotation distance. More...
 
 start_trans
 Starting translation vector of the animation. More...
 
 animation_start_time
 Point in time where the animation started. More...
 
 target_trans
 The current animation's target translation. More...
 
 target_navigation
 Reference to the target Navigation instance used in coupling animations. More...
 
 start_rot_center_mat
 Matrix representing the transformation of the start navigation's rotation center (used for coupling animation purposes). More...
 

Static Public Attributes

tuple sf_reset_trigger = avango.SFBool()
 
tuple sf_coupling_trigger = avango.SFBool()
 
tuple sf_dof_trigger = avango.SFBool()
 
list trace_materials
 List of material pretexts to choose from when a trace is created. More...
 
list material_used
 List of booleans to indicate if a material in trace_materials was already used. More...
 

Detailed Description

Wrapper class to create an input Device, a GroundFollowing instance, an InputMapping and a Platform.

Furthermore, this class reacts on the device's button inputs and toggles the 3-DOF (realistic) / 6-DOF (unrealistic) navigation mode. When switching from unrealistic to realistic mode, an animation is triggered in which the platform is rotated back in an upright position (removal of pitch and roll angle). It also handles couplings and their animations with other Navigation instances. Apart from that, it uses the class Trace to draw lines representing its past movements.

Constructor & Destructor Documentation

def lib-server.Navigation.Navigation.__init__ (   self)

Default constructor.

Member Function Documentation

def lib-server.Navigation.Navigation.activate_realistic_mode (   self)

Activates 3-DOF (realistic) navigation mode.

def lib-server.Navigation.Navigation.animate_coupling (   self)

Animates the movement to another platform during the coupling process.

def lib-server.Navigation.Navigation.animate_dofchange (   self)

Animates the removal of pitch and roll angles when switching from 6-DOF (unrealistic) to 3-DOF (realistic) navigation mode.

def lib-server.Navigation.Navigation.clear_couplings (   self)

Decouples this Navigation from all coupled Navigations.

def lib-server.Navigation.Navigation.couple_navigation (   self,
  NAVIGATION 
)

Bidirectional coupling of this and another navigation.

Parameters
NAVIGATIONThe Navigation to be coupled.
def lib-server.Navigation.Navigation.deactivate_realistic_mode (   self)

Activates 6-DOF (unrealistic) navigation mode.

def lib-server.Navigation.Navigation.decouple_navigation (   self,
  NAVIGATION 
)

Bidirectional decoupling of this and another navigation.

Parameters
NAVIGATIONThe Navigation to be decoupled.
def lib-server.Navigation.Navigation.evaluate (   self)

Evaluated every frame.

def lib-server.Navigation.Navigation.get_current_world_pos (   self)

Computes the current world position of the rotation center on the platform ground (y = 0).

def lib-server.Navigation.Navigation.my_constructor (   self,
  NET_TRANS_NODE,
  SCENEGRAPH,
  PLATFORM_SIZE,
  SCALE,
  STARTING_MATRIX,
  NAVIGATION_LIST,
  INPUT_SENSOR_TYPE,
  INPUT_SENSOR_NAME,
  NO_TRACKING_MAT,
  GF_SETTINGS,
  ANIMATE_COUPLING,
  MOVEMENT_TRACES,
  INVERT,
  SLOT_MANAGER,
  TRANSMITTER_OFFSET,
  DISPLAYS,
  AVATAR_TYPE,
  CONFIG_FILE,
  TRACKING_TARGET_NAME = None 
)

Custom constructor.

Parameters
NET_TRANS_NODEReference to the net matrix node in the scenegraph for distribution.
SCENEGRAPHReference to the scenegraph in which the navigation should take place.
PLATFORM_SIZEPhysical size of the platform in meters. Passed in an two-element list: [width, depth]
SCALEStart scaling of the platform.
STARTING_MATRIXInitial position matrix of the platform to be created.
NAVIGATION_LISTList of all navigations in the setup.
INPUT_SENSOR_TYPEString indicating the type of input device to be created, e.g. "XBoxController" or "OldSpheron"
INPUT_SENSOR_NAMEName of the input device sensor as chosen in daemon.
NO_TRACKING_MATMatrix which should be applied if no tracking is available.
GF_SETTINGSSetting list for the GroundFollowing instance: [activated, ray_start_height]
ANIMATE_COUPLINGBoolean indicating if an animation should be done when a coupling of navigations is initiated.
MOVEMENT_TRACESBoolean indicating if the device should leave traces behind.
INVERTBoolean indicating if the input values should be inverted.
SLOT_MANAGERReference to the one and only SlotManager instance in the setup.
TRANSMITTER_OFFSETThe matrix offset that is applied to the values delivered by the tracking system.
DISPLAYSThe names of the displays that belong to this navigation.
AVATAR_TYPEA string that determines what kind of avatar representation is to be used ["joseph", "joseph_table", "kinect"].
CONFIG_FILEThe path to the config file that is used.
TRACKING_TARGET_NAMEName of the device's tracking target name as chosen in daemon.
def lib-server.Navigation.Navigation.reset (   self)

Resets the platform's matrix to the initial value.

def lib-server.Navigation.Navigation.set_coupling_animation_settings (   self,
  TARGET_NAVIGATION 
)

Sets all the necessary attributes to perform a lerp and slerp animation to another navigation.

Parameters
TARGET_NAVIGATIONThe Navigation instance to animate to.
def lib-server.Navigation.Navigation.sf_coupling_trigger_changed (   self)

Evaluated when value changes.

def lib-server.Navigation.Navigation.sf_dof_trigger_changed (   self)

Evaluated when value changes.

def lib-server.Navigation.Navigation.sf_reset_trigger_changed (   self)

Evaluated when value changes.

def lib-server.Navigation.Navigation.trigger_coupling (   self)

Triggers the coupling mechanism.

When other platforms are close enough, they are coupled to each other.

def lib-server.Navigation.Navigation.trigger_dofchange (   self)

Switches from realistic to unrealistic or from unrealistic to realistic mode on this and all other coupled instances.

Member Data Documentation

lib-server.Navigation.Navigation.ANIMATE_COUPLING

Boolean indicating if an animation should be done when a coupling of navigations is initiated.

lib-server.Navigation.Navigation.animation_start_time

Point in time where the animation started.

lib-server.Navigation.Navigation.animation_time

Time of the rotation animation in relation to the rotation distance.

lib-server.Navigation.Navigation.coupled_navigations

List of coupled Navigation instances to which this Navigation's changes are forwarded to.

lib-server.Navigation.Navigation.device

Device instance handling relative inputs of physical device.

lib-server.Navigation.Navigation.groundfollowing

GroundFollowing instance to correct the absolute matrices with respect to gravity.

lib-server.Navigation.Navigation.in_coupling_animation

Boolean variable to indicate if a movement animation for coupling is in progress.

lib-server.Navigation.Navigation.in_dofchange_animation

Boolean variable to indicate if a movement animation for a DOF change (realistic/unrealistic) is in progress.

lib-server.Navigation.Navigation.input_sensor_name

Name of the input device sensor as chosen in daemon.

lib-server.Navigation.Navigation.input_sensor_type

String indicating the type of input device to be created, e.g.

"XBoxController" or "OldSpheron"

lib-server.Navigation.Navigation.inputmapping

InputMapping instance to process and map relative device inputs to an absolute matrix.

lib-server.Navigation.Navigation.material_used
static
Initial value:
1 = [False, False, False, False, False,
2  False, False, False, False, False]

List of booleans to indicate if a material in trace_materials was already used.

lib-server.Navigation.Navigation.movement_traces

Boolean indicating if the movement traces are currently visualized by line segments.

lib-server.Navigation.Navigation.movement_traces_activated

Boolean indicating if the movement traces are generally activated.

lib-server.Navigation.Navigation.NAVIGATION_LIST

Reference to a list containing all Navigation instances in the setup.

lib-server.Navigation.Navigation.NET_TRANS_NODE

Reference to the net matrix node in the scenegraph for distribution.

lib-server.Navigation.Navigation.platform

Platform instance that is controlled by the Device.

lib-server.Navigation.Navigation.SCENEGRAPH

Reference to the scenegraph.

tuple lib-server.Navigation.Navigation.sf_coupling_trigger = avango.SFBool()
static
tuple lib-server.Navigation.Navigation.sf_dof_trigger = avango.SFBool()
static
tuple lib-server.Navigation.Navigation.sf_reset_trigger = avango.SFBool()
static
lib-server.Navigation.Navigation.start_matrix

Initial position matrix of the platform.

lib-server.Navigation.Navigation.start_rot

Quaternion representing the start rotation of the animation.

lib-server.Navigation.Navigation.start_rot_center_mat

Matrix representing the transformation of the start navigation's rotation center (used for coupling animation purposes).

lib-server.Navigation.Navigation.start_trans

Starting translation vector of the animation.

lib-server.Navigation.Navigation.target_navigation

Reference to the target Navigation instance used in coupling animations.

Used for updating target_trans when the rotation center moves.

lib-server.Navigation.Navigation.target_rot

Quaternion representing the target rotation of the animation.

lib-server.Navigation.Navigation.target_trans

The current animation's target translation.

lib-server.Navigation.Navigation.timer

Instance of TimeSensor to handle the duration of animations.

lib-server.Navigation.Navigation.trace

The trace class that handles the line segment updating.

Instance of Trace class to handle trace drawing of this navigation's movements.

lib-server.Navigation.Navigation.trace_material

The material to be used for the movement traces.

lib-server.Navigation.Navigation.trace_materials
static
Initial value:
1 = ['AvatarBlue', 'AvatarCyan', 'AvatarGreen', 'AvatarMagenta', 'AvatarDarkGreen',
2  'AvatarOrange', 'AvatarRed', 'AvatarWhite', 'AvatarYellow', 'AvatarGrey']

List of material pretexts to choose from when a trace is created.

All avatars on this platform will have this material.


The documentation for this class was generated from the following file: