OpenGLContext.move.direct
index
/home/mcfletch/pylive/OpenGLContext/move/direct.py

Interactions for navigating the context

 
Modules
       
math
OpenGLContext.move.movementmanager
OpenGLContext.quaternion
OpenGLContext.events.timer

 
Classes
       
MovementManager(object)
Direct

 
class Direct(MovementManager)
    OpenGLContext's original manipulation for the view platform
 
 
Method resolution order:
Direct
MovementManager
object

Methods defined here:
backward(self, event)
(callback) Move platform backward by STEPDISTANCE
 
triggers redraw after completion
down(self, event)
(callback) Move platform downward by STEPDISTANCE
 
triggers redraw after completion
faster(self, event)
Increase our walking speed
forward(self, event)
(callback) Move platform forward by STEPDISTANCE
 
triggers redraw after completion
left(self, event)
(callback) Move platform left by STEPDISTANCE
 
triggers redraw after completion
right(self, event)
(callback) Move platform right by STEPDISTANCE
 
triggers redraw after completion
slower(self, event)
Decrease our walking speed
stepRelative(self, x=0, y=0, z=0)
Step this distance in relative (view) coordinates
straighten(self, event)
(callback) Straightens the platform orientation
 
Attempts to make the orientation equal to the
y-axis orientation of the current orientation.
 
In other words, tries to make the camera's horizon
equal to the object-space horizon (the x,z plane)
without altering the y-axis orientation.
 
See:
    OpenGLContext.viewplatform.ViewPlatform.straighten
 
triggers redraw after completion
turn(self, deltaOrientation=(0, 1, 0, 0.78539816339744828))
Apply rotation within the current orientation
 
In essence, this allows you to "turn your head"
which gives you the commonly useful ability to
function from your own frame of reference.
 
For example:
    turn( 1,0,0,angle ) will rotate the camera up
        from its current view orientation
    turn( 0,1,0,angle ) will rotate the camera about
        the current horizon
 
This method is implemented almost entirely within
the quaternion class.  Quaternion's have considerable
advantages for this type of work, as they do not
become "warped" with successive rotations.
turndown(self, event)
(callback) Rotates "head" forward (looks downward) by TURNANGLE
 
triggers redraw after completion
turnleft(self, event)
(callback) Rotates "head" to the left by TURNANGLE
 
triggers redraw after completion
turnright(self, event)
(callback) Rotates "head" to the right by TURNANGLE
 
triggers redraw after completion
turnup(self, event)
(callback) Rotates "head" backward (looks upward) by TURNANGLE
 
triggers redraw after completion
up(self, event)
(callback) Move platform upward by STEPDISTANCE
 
triggers redraw after completion

Data and other attributes defined here:
STEPDISTANCE = 0.5
TURNANGLE = 0.098174770424681035
commandBindings = {'backward': {'eventType': 'keyboard', 'modifiers': (0, 0, 0), 'name': '<down>', 'state': 1}, 'down': {'eventType': 'keyboard', 'modifiers': (0, 0, 1), 'name': '<down>', 'state': 1}, 'examine': {'button': 1, 'eventType': 'mousebutton', 'modifiers': (0, 0, 0), 'state': 1}, 'faster': {'eventType': 'keypress', 'modifiers': (0, 0, 0), 'name': ']'}, 'forward': {'eventType': 'keyboard', 'modifiers': (0, 0, 0), 'name': '<up>', 'state': 1}, 'left': {'eventType': 'keyboard', 'modifiers': (0, 0, 1), 'name': '<left>', 'state': 1}, 'right': {'eventType': 'keyboard', 'modifiers': (0, 0, 1), 'name': '<right>', 'state': 1}, 'slower': {'eventType': 'keypress', 'modifiers': (0, 0, 0), 'name': '['}, 'straighten': {'eventType': 'keypress', 'modifiers': (0, 0, 0), 'name': '-'}, 'turndown': {'eventType': 'keyboard', 'modifiers': (0, 1, 0), 'name': '<down>', 'state': 1}, ...}
commands = [('Examine', 'examine', 'startExamineMode'), ('Forward', 'forward', 'forward'), ('Back', 'backward', 'backward'), ('Up', 'up', 'up'), ('Down', 'down', 'down'), ('Left', 'left', 'left'), ('Right', 'right', 'right'), ('Turn Up', 'turnup', 'turnup'), ('Turn Down', 'turndown', 'turndown'), ('Turn Left', 'turnleft', 'turnleft'), ('Turn Right', 'turnright', 'turnright'), ('Straighten', 'straighten', 'straighten'), ('Faster', 'faster', 'faster'), ('Slower', 'slower', 'slower')]

Methods inherited from MovementManager:
__init__(self, platform)
Initialize direct movement with the platform it controls
bind(self, context)
Bind this navigation mechanism to the context
startExamineMode(self, event)
(callback) Create an examine mode interaction manager
 
This callback creates an instance of
examinemanager.ExamineManager, which will manage
the user interaction during an "examination" of
the scene.
unbind(self, context)
Unbind this navigation mechanism from the context

Data descriptors inherited from MovementManager:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from MovementManager:
context = None

 
Data
        __file__ = '/home/mcfletch/pylive/OpenGLContext/move/direct.pyc'
__name__ = 'OpenGLContext.move.direct'
__package__ = 'OpenGLContext.move'