|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brackeen.javagamebook.math3D.ViewWindow
The ViewWindow class represents the geometry of a view window for 3D viewing.
Constructor Summary | |
ViewWindow(int left,
int top,
int width,
int height,
float angle)
Creates a new ViewWindow with the specified bounds on the screen and horizontal view angle. |
Method Summary | |
float |
convertFromScreenXToViewX(float x)
Converts an x coordinate on the screen to the corresponding x coordinate on this view window. |
float |
convertFromScreenYToViewY(float y)
Converts an y coordinate on the screen to the corresponding y coordinate on this view window. |
float |
convertFromViewXToScreenX(float x)
Converts an x coordinate on this view window to the corresponding x coordinate on the screen. |
float |
convertFromViewYToScreenY(float y)
Converts a y coordinate on this view window to the corresponding y coordinate on the screen. |
float |
getAngle()
Gets the horizontal view angle of this view window. |
float |
getDistance()
Gets the distance from the camera to to this view window. |
int |
getHeight()
Gets the height of this view window. |
int |
getLeftOffset()
Gets the x offset of this view window on the screen. |
int |
getTopOffset()
Gets the y offset of this view window on the screen. |
int |
getWidth()
Gets the width of this view window. |
void |
project(Vector3D v)
Projects the specified vector to the screen. |
void |
setAngle(float angle)
Sets the horizontal view angle for this ViewWindow. |
void |
setBounds(int left,
int top,
int width,
int height)
Sets the bounds for this ViewWindow on the screen. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ViewWindow(int left, int top, int width, int height, float angle)
Method Detail |
public void setBounds(int left, int top, int width, int height)
public void setAngle(float angle)
public float getAngle()
public int getWidth()
public int getHeight()
public int getTopOffset()
public int getLeftOffset()
public float getDistance()
public float convertFromViewXToScreenX(float x)
public float convertFromViewYToScreenY(float y)
public float convertFromScreenXToViewX(float x)
public float convertFromScreenYToViewY(float y)
public void project(Vector3D v)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |