|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectespresso3d.engine.base.E3DEngineItem
espresso3d.engine.renderer.base.E3DRenderable
espresso3d.engine.viewport.E3DViewport
| Field Summary | |
static int |
RENDERMODE_DEFAULT
If a viewports rendermode is something other than default, that rendermode will overwrite any other rendermode for objects in the scene. |
static int |
VIEWPORT_MODE_ORTHOGRAPHIC
Orthographic mode for the viewport. |
static int |
VIEWPORT_MODE_PERSPECTIVE
Perspectve mode for the viewport. |
| Fields inherited from class espresso3d.engine.renderer.base.E3DRenderable |
RENDERMODE_SOLID, RENDERMODE_TEXTURED, RENDERMODE_WIREFRAME |
| 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 | |
void |
addExternalRenderable(E3DRenderable renderableItem,
int timeoutFrames)
This adds an E3DRenderable item to the ExternalRenderable list. |
void |
addImage(E3DImage image)
Add a 2D image to the viewport |
double |
getBottom()
How far below the camera to render in Ortho Mode |
E3DActor |
getCameraActor()
Gets the actor the camera is using as its camera |
double |
getFarClipPlane()
|
double |
getFovY()
|
int |
getHeight()
|
java.util.HashMap |
getImageMap()
|
double |
getLeft()
How far left of the camera to render in Ortho Mode |
int |
getMode()
Gets what mode the viewport is in. |
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()
|
E3DViewportPrinter |
getViewportPrinter()
|
int |
getWidth()
|
E3DWorld |
getWorld()
|
int |
getX()
|
int |
getY()
|
E3DVector3F |
projectPoint(E3DVector3F point3D)
Projecting a point converts a point in 3D worldspace to 2D screen coordinates (x, y). |
void |
recalcModelViewMatrix()
|
void |
recalcProjectionViewMatrix()
|
void |
recalcViewportMatrix()
|
void |
removeExternalRenderable(E3DRenderable renderableItem)
Remove an external renderable from the viewport even if its life hasn't expired |
void |
removeImage(java.lang.String imageID)
Remove a 2D image from the viewport by imageID |
void |
renderAtPosition(E3DVector3F position)
|
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 |
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 |
setImageMap(E3DSortedRenderableMap imageMap)
|
void |
setLeft(double left)
Set how far left of 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 |
setViewportPrinter(E3DViewportPrinter viewportPrinter)
|
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()
|
E3DVector3F |
unprojectPoint(E3DVector3F point2D)
Unprojecting takes a 2D point that is in screen coordinate space (x, y) and returns its 3d counterpart in world corodinate space. |
| Methods inherited from class espresso3d.engine.renderer.base.E3DRenderable |
getRenderableOptionsKey, getRenderMode, initCorrectGeometryRenderer, render, setRenderMode |
| Methods inherited from class espresso3d.engine.base.E3DEngineItem |
getEngine, setEngine |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int RENDERMODE_DEFAULT
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 - Width is how many pixels from X, NOT from 0height - Height is how many pixels from Y, NOT from 0viewportID - | 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 display. This can be null if it shouldn't render a world.public 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 getLeft()
public void setLeft(double left)
left - public double getRight()
public void setRight(double right)
public double getTop()
public void setTop(double top)
public E3DViewportPrinter getViewportPrinter()
public void setViewportPrinter(E3DViewportPrinter viewportPrinter)
public void recalcProjectionViewMatrix()
public void recalcModelViewMatrix()
public void recalcViewportMatrix()
public E3DVector3F projectPoint(E3DVector3F point3D)
public E3DVector3F unprojectPoint(E3DVector3F point2D)
point2D -
public java.util.HashMap getImageMap()
public void setImageMap(E3DSortedRenderableMap imageMap)
public void addImage(E3DImage image)
image - public void removeImage(java.lang.String imageID)
imageID - public void renderAtPosition(E3DVector3F position)
renderAtPosition in class E3DRenderable
public void addExternalRenderable(E3DRenderable renderableItem,
int timeoutFrames)
renderableItem - An E3DRenderable item that you want to render outside of the optimized rendering loop.timeoutFrames - How many frames to render this renderable for or -1 for infinitypublic void removeExternalRenderable(E3DRenderable renderableItem)
renderableItem -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||