|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.eside.flingbox.graphics.RenderCamera
public class RenderCamera
Specifies OpenGL camera interface. By setting camera's position and width camera could be moved.
Field Summary | |
---|---|
float |
bottom
Used by OpenGL |
boolean |
isChanged
Flag to change OpenGL's camera |
float |
left
Used by OpenGL |
float |
rigth
Used by OpenGL |
float |
top
Used by OpenGL |
Constructor Summary | |
---|---|
RenderCamera(float surfaceWidth,
float surfaceHeight)
Default constructor for a surface |
Method Summary | |
---|---|
Vector2D |
getAperture()
|
Vector2D |
getPosition()
|
Vector2D |
project(Vector2D v)
|
Vector2D |
scale(Vector2D v)
|
void |
setAperture(Vector2D aperture)
Sets camera's aperture |
void |
setPosition(Vector2D newPosition)
Sets Camera's position. |
void |
setSurface(float surfaceWidth,
float surfaceHeight)
Changes surface size |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public float left
public float rigth
public float top
public float bottom
public boolean isChanged
Constructor Detail |
---|
public RenderCamera(float surfaceWidth, float surfaceHeight)
Method Detail |
---|
public void setSurface(float surfaceWidth, float surfaceHeight)
public void setPosition(Vector2D newPosition)
x
- Center of the focus, xy
- Center of the focus, ywidth
- Width of camera's frame.
height is calculated to keep aspect ratiopublic void setAperture(Vector2D aperture)
horizontalAperture
- camera's horizontal aperturepublic Vector2D project(Vector2D v)
public Vector2D scale(Vector2D v)
public Vector2D getPosition()
public Vector2D getAperture()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |