![]() |
Python_2
1.0
|
Public Member Functions | |
def | __init__ (self, world, viewport, ydown=True, noDistortion=True) |
Constructor. More... | |
def | windowVecToViewport (self, x, y) |
Maps a single vector from world coordinates to viewport (screen) coordinates. More... | |
def | viewportToWindow (self, x, y) |
Maps a single point from screen coordinates to window (world) coordinates. More... | |
def | windowToViewport (self, *p) |
Maps points from world coordinates to viewport (screen) coordinates. More... | |
Public Attributes | |
world | |
viewport | |
fx | |
fy | |
ys | |
f | |
c_1 | |
c_2 | |
Private Member Functions | |
def | __windowToViewport (self, x, y) |
Maps a single point from world coordinates to viewport (screen) coordinates. More... | |
def mapper.mapper.__init__ | ( | self, | |
world, | |||
viewport, | |||
ydown = True , |
|||
noDistortion = True |
|||
) |
Constructor.
world | window rectangle. |
viewport | screen rectangle. |
ydown | whether Y axis is upside down. |
noDistortion | whether to use the same scale for both X and Y. |
|
private |
Maps a single point from world coordinates to viewport (screen) coordinates.
x,y | given point. |
References mapper.mapper.c_1, mapper.mapper.c_2, mapper.mapper.fx, mapper.mapper.fy, and mapper.mapper.ys.
Referenced by mapper.mapper.windowToViewport(), and mapper2.mapper2.windowToViewport().
def mapper.mapper.viewportToWindow | ( | self, | |
x, | |||
y | |||
) |
Maps a single point from screen coordinates to window (world) coordinates.
x,y | given point. |
References mapper.mapper.c_1, mapper.mapper.c_2, mapper.mapper.fx, and mapper.mapper.fy.
def mapper.mapper.windowToViewport | ( | self, | |
* | p | ||
) |
Maps points from world coordinates to viewport (screen) coordinates.
p | a variable number of points. |
References mapper.mapper.__windowToViewport().
def mapper.mapper.windowVecToViewport | ( | self, | |
x, | |||
y | |||
) |
Maps a single vector from world coordinates to viewport (screen) coordinates.
x,y | given vector. |
References mapper.mapper.fx, mapper.mapper.fy, and mapper.mapper.ys.
mapper.mapper.c_1 |
Referenced by mapper.mapper.__windowToViewport(), and mapper.mapper.viewportToWindow().
mapper.mapper.c_2 |
Referenced by mapper.mapper.__windowToViewport(), and mapper.mapper.viewportToWindow().
mapper.mapper.f |
mapper.mapper.fx |
mapper.mapper.fy |
mapper.mapper.viewport |
mapper.mapper.world |
mapper.mapper.ys |