Abstract camera base class. A usable camera would inherit from this,
and from FrustumCam or OrthoCam.
Each engine must have at least one camera. If none are provided by
programmer, the interface will install its preferred camera.
Each camera tracks its own viewport, which is by default the size of
the window.
Method Summary |
|
__init__ (self,
engine,
eye,
center,
up,
left,
right,
bottom,
top,
near,
far)
Initialize new camera. |
|
setup (self)
Overridable for things to be done before use, but after engine and
interface are initialized. |
|
zoomIn (self,
factor)
Zoom in. |
|
zoomOut (self,
factor)
Zoom out. |
|
setViewport (self,
left,
top,
right,
bottom)
Record desired viewport (left, top, right, bottom). |
|
displayViewport (self)
Push the viewport params to OpenGL. |
|
displayBackground (self)
Clear the display, or alternate prelim treatment. |
|
refresh (self)
Refresh the position of the camera. |
|
restoreInit (self)
Restore previously saved initialization state. |
|
saveInit (self)
Save state of initialization internally for later restoration. |
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) |
|
__setattr__ (...)
x.__setattr__('name', value) <==> x.name = value |
|
__str__ (x)
x.__str__() <==> str(x) |
__init__(self,
engine,
eye,
center,
up,
left,
right,
bottom,
top,
near,
far)
(Constructor)
Initialize new camera.
-
- Parameters:
engine -
the engine
eye -
x,y,z tuple with eye position
center -
x,y,z tuple with center of view
up -
x,y,z tuple pointing up
left -
left edge of viewing box, in eyespace (float)
right -
right edge of viewing box, in eyespace (float)
bottom -
bottom edge of viewing box, in eyespace (float)
top -
top edge of viewing box, in eyespace (float)
near -
near edge of viewing box, in eyespace (float)
far -
far edge of viewing box, in eyespace (float)
- Overrides:
__builtin__.object.__init__
|