Trees | Index | Help |
|
---|
Package spyre ::
Module spyre ::
Class Camera
|
|
BasicCamera
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 | |
---|---|
Initialize new camera. | |
Overridable for things to be done before use, but after engine and interface are initialized. | |
Zoom in. | |
Zoom out. | |
Record desired viewport (left, top, right, bottom). | |
Push the viewport params to OpenGL. | |
Clear the display, or alternate prelim treatment. | |
Refresh the position of the camera. | |
Restore previously saved initialization state. | |
Save state of initialization internally for later restoration. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Property Summary | |
---|---|
eye : Track eye position | |
center : Track center position |
Instance Variable Summary | |
---|---|
objects : Each camera keeps a list of displayable objects. |
Method Details |
---|
__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=1.4142135623730951)Zoom in. Narrows the viewing box.
|
zoomOut(self, factor=1.4142135623730951)Zoom out. Widens the viewing box.
|
setViewport(self, left, top, right, bottom)Record desired viewport (left, top, right, bottom). Each value is in range 0-1, representing fraction of window. The default (0,0,1,1) is entire window. |
displayViewport(self)Push the viewport params to OpenGL. |
displayBackground(self)Clear the display, or alternate prelim treatment. Always clears depth buffer, clears color if background attribute is set. This method can be overridden for multiviewport effects. |
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. |
Property Details |
---|
eyeTrack eye position |
centerTrack center position |
Instance Variable Details |
---|
Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Jan 07 17:58:17 2006 | http://epydoc.sf.net |