OpenGLContext.move.viewplatformmixin

Mix-in class for contexts needing to control a viewplatform object

Classes

Mix-in for Context classes providing ViewPlatform support
The viewplatform module provides a ViewPlatform object which provides generic "camera" support for OpenGLContext. This mix-in provides Context classes with automatic support for instantiating and using these objects. In particular, it overrides the Viewpoint customization point, dispatching the call to the platform's render method.
In addition, the ViewPlatformMixin includes support for the view-platform-specific examine manager (which rotates the view platform about an object-space center).
The getViewPlatform method performs the actual instantiation of the ViewPlatform, which allows a sub-classes to use different view-platform classes with minimal interference.
Finally, the ViewPlatformMixin performs "default" registration of various event handlers using the setupDefaultEventCallbacks customization point. These provide the default navigation controls for OpenGLContext Contexts.
Attributes: platform -- the view platform instantiated by the context, or None if there is not yet a view platform instantiated (the platform is normally instantiated during the first rendering pass) movementManager -- currently bound movement manager initialPosition -- the initial view position used by the platform. See: ViewPlatform.setPosition initialOrientation -- the initial view orientation used by the platform. See: ViewPlatform.setOrientation STEPDISTANCE -- relative distance that each forward/ backward/left/right step should move the camera, single float value. TURNANGLE -- relative rotational distance that each "turn" should rotate the camera, single float value in radians.