OpenGLContext.move.direct
Interactions for navigating the context
Classes
class Direct(
MovementManager
):
OpenGLContext's original manipulation for the view platform
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
forward(
self
,
event
)
(callback) Move platform forward by STEPDISTANCE
triggers redraw after completion
right(
self
,
event
)
(callback) Move platform right by STEPDISTANCE
triggers redraw after completion
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.7853981633974483)
)
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