|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectespresso3d.engine.base.E3DEngineItem
espresso3d.engine.base.E3DViewport
| Field Summary | |
static int |
VIEWPORT_MODE_ORTHOGRAPHIC
Orthographic mode for the viewport. |
static int |
VIEWPORT_MODE_PERSPECTIVE
Perspectve mode for the viewport. |
| Constructor Summary | |
E3DViewport(E3DEngine engine,
int x,
int y,
int width,
int height,
java.lang.String viewportID)
This is used to create a perspective viewport |
|
| Method Summary | |
double |
getBottom()
How far below the camera to render in Ortho Mode |
E3DActor |
getCameraActor()
Gets the actor the camera is using as its camera |
E3DVector3F |
getClearColor()
Get the color the viewport clears to |
double |
getFar()
How far from the camera to render in Ortho Mode |
double |
getFarClipPlane()
|
double |
getFovY()
|
int |
getHeight()
|
double |
getLeft()
How far left of the camera to render in Ortho Mode |
int |
getMode()
Gets what mode the viewport is in. |
double |
getNear()
How close to the camera to render in Ortho Mode |
double |
getNearClipPlane()
|
double |
getOrthoZoom()
Gets what the current ortho zoom factor is |
double |
getRight()
How far right of the camera to render in Ortho Mode |
double |
getTop()
How far above the camera to render in Ortho Mode |
java.lang.String |
getViewportID()
|
int |
getWidth()
|
E3DWorld |
getWorld()
|
int |
getX()
|
int |
getY()
|
void |
setBottom(double bottom)
Set how far below the camera to render in Ortho Mode |
void |
setCameraActor(E3DActor cameraActor)
This is the actor that the viewport uses as the camera |
void |
setClearColor(E3DVector3F clearColor)
Set the color the viewport clears to (RGB = XYZ) (Defaults to 0, 0, 0 = black) |
void |
setFar(double far)
Set how far from the camera to render in Ortho Mode |
void |
setFarClipPlane(double farClipPlane)
Sets the far clipping plane. |
void |
setFovY(double fovY)
Sets how many degress you can see in the Y dir. |
void |
setHeight(int height)
|
void |
setLeft(double left)
Set how far left of the camera to render in Ortho Mode |
void |
setNear(double near)
Set how close to the camera to render in Ortho Mode |
void |
setNearClipPlane(double nearClipPlane)
Sets the near clipping plane. |
void |
setOrthoBounds(double left,
double right,
double top,
double bottom,
double near,
double far)
set all the boundaries for the ortho view mode in one method |
void |
setOrthoZoom(double zoomScalar)
This makes the current ortho view zoom out(positive # greater than 1), or zoom in (positive number > 0.0 and < 1.0). |
void |
setRight(double right)
Set how far right of the camera to render in Ortho Mode |
void |
setTop(double top)
Set how far above the camera to render in Ortho Mode |
void |
setWidth(int width)
|
void |
setWorld(E3DWorld world)
|
void |
setX(int x)
Sets the x coordinate of the bottom left corner of the viewport. |
void |
setY(int y)
Sets the y coordinate of the bottom left corner of the viewport |
void |
switchToOrthographicMode(double left,
double right,
double top,
double bottom,
double near,
double far)
Switch this viewport to orthographic rendering. |
void |
switchToPerspectiveMode(double fovY,
double farClipPlane,
double nearClipPlane)
Switch this viewport to perspective rendering. |
void |
switchToViewport()
|
| Methods inherited from class espresso3d.engine.base.E3DEngineItem |
getEngine, setEngine |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int VIEWPORT_MODE_ORTHOGRAPHIC
public static final int VIEWPORT_MODE_PERSPECTIVE
| Constructor Detail |
public E3DViewport(E3DEngine engine,
int x,
int y,
int width,
int height,
java.lang.String viewportID)
engine - The engine the viewport will be part ofx - The x coordinate of the bottom left corner of the viewporty - The y coordinate of the bottom left corner of the viewportwidth - height - viewportID - | Method Detail |
public int getHeight()
public void setHeight(int height)
height - The height of the viewport. This is not a coordinate, it is how high to make it from y.
Remember, Y gets larger as it goes up the screenpublic int getWidth()
public void setWidth(int width)
width - The width of the viewport. This is not a coordinate, it is how wide to make it from xpublic int getX()
public void setX(int x)
x - public int getY()
public void setY(int y)
y - public double getFarClipPlane()
public void setFarClipPlane(double farClipPlane)
farClipPlane - The farClipPlane to set.public double getFovY()
public void setFovY(double fovY)
fovY - The fovY to set.public double getNearClipPlane()
public void setNearClipPlane(double nearClipPlane)
nearClipPlane - The nearClipPlane to set.public void switchToViewport()
public E3DWorld getWorld()
public void setWorld(E3DWorld world)
world - The world to set for the viewport to displaypublic java.lang.String getViewportID()
public void setCameraActor(E3DActor cameraActor)
cameraActor - public E3DActor getCameraActor()
public int getMode()
public void switchToOrthographicMode(double left,
double right,
double top,
double bottom,
double near,
double far)
left - How far left to render of the viewport's camera actorright - How right left to render of the viewport's camera actortop - How far above to render of the viewport's camera actorbottom - How far below to render of the viewport's camera actornear - How close of objects to render by the camerafar - How far away to render objects from the camera
public void switchToPerspectiveMode(double fovY,
double farClipPlane,
double nearClipPlane)
fovY - The field of view angle in degress in the Y direciton. 45 is a standard value. Too high makes things look fisheyed.farClipPlane - This specifies the maximum distance that objects can be from the camera and still be renderednearClipPlane - Specifies the minimum distance that objects can be from the camera and still be rendered
public void setOrthoBounds(double left,
double right,
double top,
double bottom,
double near,
double far)
left - right - top - bottom - near - far - public void setOrthoZoom(double zoomScalar)
public double getOrthoZoom()
public double getBottom()
public void setBottom(double bottom)
public double getFar()
public void setFar(double far)
public double getLeft()
public void setLeft(double left)
left - public double getNear()
public void setNear(double near)
public double getRight()
public void setRight(double right)
public double getTop()
public void setTop(double top)
public E3DVector3F getClearColor()
public void setClearColor(E3DVector3F clearColor)
clearColor -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||