Eidolon
|
Public Member Functions | |
def | __init__ (self, camera, dist, zScale=1.0, tScale=1.0, rScale=1.0) |
def | start (self, mgr) |
def | stop (self, mgr) |
def | reset (self) |
def | getPropTuples (self) |
def | setZLocked (self, zlock) |
def | isZLocked (self) |
def | setSeeAllBoundBox (self, bb) |
def | setVertFOV (self, fov) |
def | setNearClip (self, clip) |
def | setFarClip (self, clip) |
def | getVertFOV (self) |
def | getNearClip (self) |
def | getFarClip (self) |
def | setOrtho (self, ortho) |
def | setWireframe (self, wire) |
def | setAspectRatio (self, aspect) |
def | setCameraLight (self, light) |
def | translate (self, dx, dy, dz) |
def | rotate (self, dx_r, dy=0) |
def | zoom (self, dist) |
def | setPosition (self, pos) |
def | setRotation (self, theta_r, phi=0) |
def | setZoom (self, dist) |
def | getPosition (self) |
def | getCameraPosition (self) |
def | getZoom (self) |
def | getRotator (self) |
def | getCameraRotation (self) |
Public Attributes | |
camera | |
dist | |
zScale | |
rScale | |
tScale | |
radiusPower | |
prevX | |
prevY | |
pos | |
campos | |
freerotator | |
theta | |
phi | |
rho | |
phisub | |
Private Member Functions | |
def | _resizeCB (self, w, h) |
def | _mousePressCB (self, e) |
def | _mouseMoveCB (self, e) |
def | _mouseWheelCB (self, e) |
def | _setCamera (self) |
def | _orientCamera (self, cam, pos, lookat, rot) |
Private Attributes | |
_isZLocked | |
Implements a Z-locked camera controller, where Z is always up on screen. This means that the scene must first be rotated from the default orientation with Z pointing towards the camera, this is done by adding pi/2 to phi when constructing the Y-axis rotator.
def __init__ | ( | self, | |
camera, | |||
dist, | |||
zScale = 1.0 , |
|||
tScale = 1.0 , |
|||
rScale = 1.0 |
|||
) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
def getCameraPosition | ( | self | ) |
Returns the camera's position.
def getCameraRotation | ( | self | ) |
Returns the rotation applied to the camera.
def getFarClip | ( | self | ) |
def getNearClip | ( | self | ) |
def getPosition | ( | self | ) |
Returns the look-at position.
def getPropTuples | ( | self | ) |
def getRotator | ( | self | ) |
Get the rotator for the camera based on self.theta and self.phi or self.freerotator. This represents the rotation applied to orient the camera to face the look at position and a given up direction from the initial position as defined by this controller.
def getVertFOV | ( | self | ) |
def getZoom | ( | self | ) |
Returns the zoom distance.
def isZLocked | ( | self | ) |
def reset | ( | self | ) |
def rotate | ( | self, | |
dx_r, | |||
dy = 0 |
|||
) |
Rotate the camera using the given arguments. If the camera is Z-locked (isZLocked() is True), `dx_r' is a float value scaled by self.rScale*0.005 then added to self.theta and `dy' is also a float scaled by self.rScale*0.005 then added to self.phi. If the camera is not Z-locked, `dx_r' is a rotator applied to the camera's rotation.
def setAspectRatio | ( | self, | |
aspect | |||
) |
def setCameraLight | ( | self, | |
light | |||
) |
def setFarClip | ( | self, | |
clip | |||
) |
def setNearClip | ( | self, | |
clip | |||
) |
def setOrtho | ( | self, | |
ortho | |||
) |
def setPosition | ( | self, | |
pos | |||
) |
Sets the look-at position to `pos'.
def setRotation | ( | self, | |
theta_r, | |||
phi = 0 |
|||
) |
Sets rotational parameters. If isZLocked() is True, `theta_r' and `phi' are polar rotation values, these are used to set self.theta and self.phi contrained within their respective ranges and tolerances. If isZLocked() is False then `theta_r' is a rotator which is assigned to self.freerotator.
def setSeeAllBoundBox | ( | self, | |
bb | |||
) |
def setVertFOV | ( | self, | |
fov | |||
) |
def setWireframe | ( | self, | |
wire | |||
) |
def setZLocked | ( | self, | |
zlock | |||
) |
def setZoom | ( | self, | |
dist | |||
) |
Sets the distance from the look-at position to max(0,001,`dist').
def start | ( | self, | |
mgr | |||
) |
def stop | ( | self, | |
mgr | |||
) |
def translate | ( | self, | |
dx, | |||
dy, | |||
dz | |||
) |
Translate relative to the initial orientation (Y-forward, Z-up) rotated by the camera's rotator.
def zoom | ( | self, | |
dist | |||
) |
Add `dist`*self.zScale to the view distance.
|
private |
camera |
campos |
dist |
freerotator |
phi |
phisub |
pos |
prevX |
prevY |
radiusPower |
rho |
rScale |
theta |
tScale |
zScale |