PyJuggler.__osgapp
index
/tmp/rpm/BUILD/PyJuggler-1.0.1-src/lib/python2.3/site-packages/PyJuggler/__osgapp.so

PyJuggler.__osgapp is an extension module written in Boost.Python
that exposes the C++ class vrj::OsgApp.  Upon successful loading,
the symbols of this module are imported into the PyJuggler.vrj
namespace for use in the authoring of VR Juggler application
objects based on Open Scene Graph.  To accomplish this, PyOSG must
be used together with vrj.OsgApp.
 
Refer to the VR Juggler 2.0 C++ documentation for general usage
details:
   http://www.vrjuggler.org/vrjuggler/docs.php

 
Classes
       
PyJuggler.__vrj.GlApp(PyJuggler.__vrj.App)
OsgApp

 
class OsgApp(PyJuggler.__vrj.GlApp)
    vrj.OsgApp encapsulates an Open Scene Graph (OSG) application.
This defines the base class from which OSG-based application
objects should be derived.  It makes use of the OpenGL Draw
Manager.
 
To use OSG with Python and this class, use PyOSG.  PyOSG is also
written using Boost.Python, so instances of PyOSG objects can be
passed into methods of this class without compatibility problems.
 
See: vrj.GlApp
 
 
Method resolution order:
OsgApp
PyJuggler.__vrj.GlApp
PyJuggler.__vrj.App
Boost.Python.instance
__builtin__.object

Methods defined here:
__init__(...)
__init__()
Default constructor.  Uses vrj.Kernel.instance().
 
__init__(kernel)
Arguments:
kernel -- The vrj.Kernel instance that is active (so the
          application has easy access to the kernel).
apiInit(...)
apiInit()
Application graphics API initialization function.  Execute any
initialization needed after the graphics API is started but
before the Draw Manager starts the rendering loop(s).
bufferPreDraw(...)
bufferPreDraw()
Function that is called once for each frame buffer of an
OpenGL context.  This function is executed after contextInit()
(if neede) but before contextPreDraw().  It is called once
per frame buffer (see note below).
 
Pre-conditions:
The OpenGL context has been set to the context for drawing.
 
Post-conditions:
The application object has executed any commands that need to
be executed once per context, per buffer, per frame.
 
Note:
This function is designed to be used when some task must be
performed only once per frame buffer (i.e., once for the left
tbuffer, once for the right buffer).  For example, the OpenGL
clear color should be defined and glClear(GL_COLOR_BUFFER_BIT)
should be called in this method.
configCanHandle(...)
configCanHandle(element) -> Boolean
Defaults to handling nothing.
 
Arguments:
element -- An instance of jccl.ConfigElement.
configProcessPending(...)
configProcessPending() -> int
Inherited from jccl.ConfigElementHandler and not overridden.
configSceneView(...)
configSceneView(newSceneVeiwer)
Configures newly created scene viewers.  This is called
immediately after a new scene viewer is created for a context.
This is the place to configure application background colors
and other viewer-specific information.
 
Arguments:
newSceneViewer -- An osgUtil.SceneView object that is the
                  newly created scene view.
contextClose(...)
contextClose()
Function that is called immediately before a context is closed.
Use this function to clean up any context-specific data
structures.
contextInit(...)
contextInit()
Function that is called immediately after a new context is
created.  Use this function to create context-specific data
structures such as display lists and texture objects that are
known to be required when the context is created.
 
Pre-condition:
The OpenGL context has been set to the new context.
 
Post-condition:
The application has completed context-specific initialization.
contextPostDraw(...)
contextPostDraw()
Function that is called upon exit of the context after
rendering
 
Pre-conditions:
The OpenGL context has been set to the context for drawing.
contextPreDraw(...)
contextPreDraw()
Function that is called upon entry into the context before
rendering begins.  This can be used to allocate
context-specific data dynamically.
 
Pre-conditions:
The OpenGL context has been set to the context for drawing.
 
Post-conditins:
The application object has executed any commands that need to
be executed only once per context, per frame.
 
This function can be used for things that need to happen every
frame but only once per context.
depSatisfied(...)
depSatisfied() -> Boolean
Are any application dependencies satisified?  If this
application requires anything special of the system for
successful initialization, check it here.  If the return value
is False, then this application will not be started yet.  If
the return value is True, this application will be allowed to
enter the system.
draw(...)
draw()
Function to draw the scene.  Override this method with great
create.  All the logic to handle multi-pipe rendering and
other VR Juggler features happens here.
 
Pre-conditions:
OpenGL state has correct transformation and buffer selected.
 
Post-conditions:
The current sceen has been drawn.
exit(...)
exit()
Executes any final clean-up needed for the application before
exiting.
focusChanged(...)
focusChanged()
Called when the focus state changes.
getDrawScaleFactor(...)
getDrawScaleFactor() -> float
Returns the scale factor to convert from Juggler units
(meters) to application units.  Internally, VR Juggler stores
and processes all position values in meterrs.  The scale
factor returned by this method is used by VR Juggler to scale
the rendering state from meters to whatever units this
application wants to use.  For example, to render in feet,
return 3.28 (gadget.PositionUnitConversion.ConvertToFeet).
getScene(...)
getScene() -> osg.Group object
Gets the root fo the scene to render.  Called each frame to
get teh current scene to render.
haveFocus(...)
haveFocus() -> Boolean
Does this application currently have focus?  If an application
has focus, the user may be attempting to interact with it, so
the application should process input.  If not, the user is
not interacting with it, so ignore all input.  However, the
user may still be viewing the application, so render, update
animations, etc.  This is akin to the way that a user can only
interact with a GUI window that has focus.
init(...)
init()
Application initialization function.  Execute any
initialization needed before the graphics API is started.  If
this method is overridden, it must be called by the overriding
version.  This calls initScene(), which is used to set up this
application object's scene graph.
 
Note:
Derived classes MUST call the base class version of this
method.
initScene(...)
initScene()
Initializes the scene.  Called by init() to initialize the
scene.
intraFrame(...)
intraFrame()
Function called during the application's drawing time.
latePreFrame(...)
latePreFrame()
Function called after preFrame() and application-specific data
synchronization (in a cluster conifguration) but before the
start of a new frame.
 
Note:
This is required because we cannot update data during the
rendering process since it might be using multiple threads.
pipePreDraw(...)
pipePreDraw()
Function that is called at the beginning of the drawing of eacn
pipe.
 
Pre-conditions:
The library is preparing to render all windows on a given
pipe.
 
Post-conditions:
Any pre-pipe user calls have been done.
 
Note:
Currently the OpenGL context is not set when this function is
called.  This is a TEST function.  USE AT YOUR OWN RISK!
postFrame(...)
postFrame()
Function alled before updating input devices but after the
frame is complete.
preFrame(...)
preFrame()
Function called before the Juggler frame starts.  This is
called after input device updates but before the start of a
new frame.
reset(...)
reset()
Resets the application.  This is used when the kernel (or
applications would like this application to reset to its
initial state.
setFocus(...)
setFocus(newState)
Sets the focus state.
 
Post-condition:
If the focus state has changed, then focusChanged() is
called.
 
Arguments:
newState -- A Boolean value indicating whether this application
            now has focus.

Properties defined here:
mHaveFocus
get = (...)
set = (...)
mKernel
get = (...)
set = (...)

Data and other attributes defined here:
__instance_size__ = 240

Data and other attributes inherited from Boost.Python.instance:
__dict__ = <dictproxy object>
__new__ = <built-in method __new__ of Boost.Python.class object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
__weakref__ = <member '__weakref__' of 'Boost.Python.instance' objects>