|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IViewportTransform
This is the viewport transform used from drawing. Use yFlip if you are drawing from the top-left corner.
| Method Summary | |
|---|---|
Vec2 |
getCenter()
center of the viewport. |
Vec2 |
getExtents()
This is the half-width and half-height. |
void |
getScreenToWorld(Vec2 argScreen,
Vec2 argWorld)
takes the screen coordinates (argScreen) and puts the corresponding world coordinates in argWorld. |
void |
getScreenVectorToWorld(Vec2 argScreen,
Vec2 argWorld)
Transforms the given directional screen vector back to the world direction. |
void |
getWorldToScreen(Vec2 argWorld,
Vec2 argScreen)
takes the world coordinate (argWorld) puts the corresponding screen coordinate in argScreen. |
void |
getWorldVectorToScreen(Vec2 argWorld,
Vec2 argScreen)
Transforms the given directional vector by the viewport transform (not positional) |
boolean |
isYFlip()
|
void |
setCamera(float x,
float y,
float scale)
Sets the transform's center to the given x and y coordinates, and using the given scale. |
void |
setCenter(float x,
float y)
sets the center of the viewport. |
void |
setCenter(Vec2 argPos)
sets the center of the viewport. |
void |
setExtents(float argHalfWidth,
float argHalfHeight)
This sets the half-width and half-height of the viewport. |
void |
setExtents(Vec2 argExtents)
This sets the half-width and half-height. |
void |
setYFlip(boolean yFlip)
|
| Method Detail |
|---|
boolean isYFlip()
void setYFlip(boolean yFlip)
yFlip - if we flip the y axis when transformingVec2 getExtents()
void setExtents(Vec2 argExtents)
argExtents -
void setExtents(float argHalfWidth,
float argHalfHeight)
argHalfWidth - argHalfHeight - Vec2 getCenter()
void setCenter(Vec2 argPos)
argPos -
void setCenter(float x,
float y)
x - y -
void setCamera(float x,
float y,
float scale)
x - y - scale -
void getWorldVectorToScreen(Vec2 argWorld,
Vec2 argScreen)
argVec - argOut -
void getScreenVectorToWorld(Vec2 argScreen,
Vec2 argWorld)
argVec - argOut -
void getWorldToScreen(Vec2 argWorld,
Vec2 argScreen)
argWorld - argScreen -
void getScreenToWorld(Vec2 argScreen,
Vec2 argWorld)
argScreen - argWorld -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||