public class OrthographicCamera extends Camera implements HasNearFar
OrthographicCamera camera = new OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 );
// or, simple
OrthographicCamera camera = new OrthographicCamera( width, height, 1, 1000 );
Object3D.ObjectHandler, Object3D.Traverse
__webglActive, __webglInit, _modelViewMatrix, _normalMatrix, DefaultUp
EVENT_BUS
Constructor and Description |
---|
OrthographicCamera(double width,
double height,
double near,
double far)
Orthographic Camera constructor.
|
OrthographicCamera(double left,
double right,
double top,
double bottom,
double near,
double far)
Orthographic Camera constructor.
|
Modifier and Type | Method and Description |
---|---|
OrthographicCamera |
clone()
Creates a new clone of this object and all descendants.
|
double |
getBottom()
Gets Camera frustum bottom plane.
|
double |
getFar()
Gets Camera frustum far plane.
|
double |
getLeft()
Gets Camera frustum left plane.
|
double |
getNear()
Gets Camera frustum near plane.
|
double |
getRight()
Gets Camera frustum right plane.
|
double |
getTop()
Gets Camera frustum top plane.
|
void |
onResize(ViewportResizeEvent event) |
void |
setBottom(double bottom)
Sets Camera frustum bottom plane.
|
void |
setFar(double far)
Sets Camera frustum far plane.
|
void |
setLeft(double left)
Sets Camera frustum left plane.
|
void |
setNear(double near)
Sets Camera frustum near plane.
|
void |
setRight(double right)
Sets Camera frustum right plane.
|
void |
setSize(double width,
double height) |
void |
setTop(double top)
Sets Camera frustum top plane.
|
java.lang.String |
toString() |
void |
updateProjectionMatrix()
Updates the camera projection matrix.
|
addViewportResizeHandler, clone, getMatrixWorldInverse, getProjectionMatrix, getWorldDirection, getWorldDirection, lookAt, setMatrixWorldInverse, setProjectionMatrix
add, add, applyMatrix, clone, clone, getChildren, getChildrenByClass, getId, getMatrix, getMatrixWorld, getName, getObjectById, getObjectByName, getParent, getPosition, getQuaternion, getRenderDepth, getRotation, getScale, getUp, getWorldPosition, getWorldPosition, getWorldQuaternion, getWorldQuaternion, getWorldRotation, getWorldRotation, getWorldScale, getWorldScale, isCastShadow, isFrustumCulled, isMatrixAutoUpdate, isMatrixWorldNeedsUpdate, isReceiveShadow, isRotationAutoUpdate, isVisible, localToWorld, remove, remove, rotateOnAxis, rotateX, rotateY, rotateZ, setCastShadow, setChildren, setFrustumCulled, setHandler, setMatrix, setMatrixAutoUpdate, setMatrixWorld, setMatrixWorldNeedsUpdate, setName, setParent, setPosition, setQuaternion, setReceiveShadow, setRenderDepth, setRotation, setRotationAutoUpdate, setRotationFromAxisAngle, setRotationFromEuler, setRotationFromMatrix, setRotationFromQuaternion, setScale, setUp, setVisible, translateOnAxis, translateX, translateY, translateZ, traverse, traverseVisible, updateMatrix, updateMatrixWorld, worldToLocal
public OrthographicCamera(double width, double height, double near, double far)
width
- Camera frustum width plane.height
- Camera frustum height plane.near
- Camera frustum near planefar
- Camera frustum far plane.public OrthographicCamera(double left, double right, double top, double bottom, double near, double far)
left
- Camera frustum left plane.right
- Camera frustum right plane.top
- Camera frustum top plane.bottom
- Camera frustum bottom plane.near
- Camera frustum near planefar
- Camera frustum far plane.public void onResize(ViewportResizeEvent event)
onResize
in interface ViewportResizeHandler
onResize
in class Camera
public void setSize(double width, double height)
public double getLeft()
public void setLeft(double left)
public double getRight()
public void setRight(double right)
public double getTop()
public void setTop(double top)
public double getBottom()
public void setBottom(double bottom)
public double getNear()
getNear
in interface HasNearFar
public void setNear(double near)
setNear
in interface HasNearFar
public double getFar()
getFar
in interface HasNearFar
public void setFar(double far)
setFar
in interface HasNearFar
public void updateProjectionMatrix()
Must be called after change of parameters.
public OrthographicCamera clone()
Object3D