espresso3d.engine.base
Class E3DViewport

java.lang.Object
  extended byespresso3d.engine.base.E3DEngineItem
      extended byespresso3d.engine.base.E3DViewport

public class E3DViewport
extends E3DEngineItem

Author:
Curt A viewport is the region that defines where in the window to perform rendering, and what world to render in it

Constructor Summary
E3DViewport(E3DEngine engine, int x, int y, int width, int height, java.lang.String viewportID)
           
 
Method Summary
 E3DActor getCameraActor()
          Gets the actor the camera is using as its camera
 double getFarClipPlane()
           
 double getFovY()
           
 int getHeight()
           
 double getNearClipPlane()
           
 java.lang.String getViewportID()
           
 int getWidth()
           
 E3DWorld getWorld()
           
 int getX()
           
 int getY()
           
 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 setNearClipPlane(double nearClipPlane)
          Sets the near clipping plane.
 void setWidth(int width)
           
 void setWorld(E3DWorld world)
           
 void setX(int x)
          Sets the x coordinate of the upper left corner of the viewport.
 void setY(int y)
          Sets the y coordinate of the bottom left corner of the viewport
 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
 

Constructor Detail

E3DViewport

public E3DViewport(E3DEngine engine,
                   int x,
                   int y,
                   int width,
                   int height,
                   java.lang.String viewportID)
Method Detail

getHeight

public int getHeight()
Returns:
Returns the height.

setHeight

public void setHeight(int height)
Parameters:
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 screen

getWidth

public int getWidth()
Returns:
Returns the width.

setWidth

public void setWidth(int width)
Parameters:
width - The width of the viewport. This is not a coordinate, it is how wide to make it from x

getX

public int getX()
Returns:
Returns the x coordinate of the upper left corner of the viewport

setX

public void setX(int x)
Sets the x coordinate of the upper left corner of the viewport. The bottom left corner is 0, and X gets larger as it mvoes right

Parameters:
x -

getY

public int getY()
Returns:
Returns the y coordinate of the bottom left corner of the viewport. The upper bottom corner is 0, and Y gets larger as it goes up the screen

setY

public void setY(int y)
Sets the y coordinate of the bottom left corner of the viewport

Parameters:
y -

getFarClipPlane

public double getFarClipPlane()
Returns:
Returns the farClipPlane. This is how far the scene will be drawn away from the cameara. Defaults to 100

setFarClipPlane

public void setFarClipPlane(double farClipPlane)
Sets the far clipping plane. The large the value, the farther away you will be able to see. However, too large of a value can hurt performance.

Parameters:
farClipPlane - The farClipPlane to set.

getFovY

public double getFovY()
Returns:
Returns the fovY. This is how many degrees you can see in the Y dir

setFovY

public void setFovY(double fovY)
Sets how many degress you can see in the Y dir.

Parameters:
fovY - The fovY to set.

getNearClipPlane

public double getNearClipPlane()
Returns:
Returns the nearClipPlane.

setNearClipPlane

public void setNearClipPlane(double nearClipPlane)
Sets the near clipping plane. The smaller the value, the closer you will be able to see objects to the camera.Defaults to 0.1;

Parameters:
nearClipPlane - The nearClipPlane to set.

switchToViewport

public void switchToViewport()

getWorld

public E3DWorld getWorld()
Returns:
Returns the world that the viewport needs to display

setWorld

public void setWorld(E3DWorld world)
Parameters:
world - The world to set for the viewport to display

getViewportID

public java.lang.String getViewportID()

setCameraActor

public void setCameraActor(E3DActor cameraActor)
This is the actor that the viewport uses as the camera

Parameters:
cameraActor -

getCameraActor

public E3DActor getCameraActor()
Gets the actor the camera is using as its camera

Returns: