Package spyre :: Module stereoscopic :: Class StereoCamera
[frames | no frames]

Type StereoCamera

      object --+    
               |    
StereoBaseCamera --+
                   |
                  StereoCamera

Known Subclasses:
StereoRedBlueCamera, StereoTopBottomCamera

Camera for stereo camera functionality. Initialize with a non-stereo camera.

This class wraps the original (non-stereo) camera instance, passing most method calls through to it. It implicitly creates a second camera for second eye, using a SubordinateEyeCamera and installs that camera in the engine.

The and calc methods maintain the position of this camera and also of the subordinate camera.
Method Summary
  __init__(self, camera, interOc)
Initialize newly constructed camera.
  __getattr__(self, attname)
Delegate most attribute lookups.
  __setattr__(self, attname, val)
Delegate most attribute lookups.
  calc(self)
Recalc position, and pass on to subordinate camera.
  calcEyes(self)
Calculate the two eye pos's.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __str__(x)
x.__str__() <==> str(x)

Method Details

__init__(self, camera, interOc=None)
(Constructor)

Initialize newly constructed camera.
Parameters:
camera - a non-stereo camera instance.
interOc - the distance between the eyes. if omitted, defaults to 1/30th of near distance.
           (type=float)
Overrides:
__builtin__.object.__init__

__getattr__(self, attname)
(Qualification operator)

Delegate most attribute lookups.

__setattr__(self, attname, val)

Delegate most attribute lookups.
Overrides:
__builtin__.object.__setattr__

calc(self)

Recalc position, and pass on to subordinate camera.
Returns:
None

calcEyes(self)

Calculate the two eye pos's.
Returns:
eye tuple (x,y,z), center tuple (x,y,z)

Generated by Epydoc 2.1 on Sat Jan 07 17:58:16 2006 http://epydoc.sf.net