Package com.ardor3d.renderer
Class StereoCamera
java.lang.Object
com.ardor3d.renderer.Camera
com.ardor3d.renderer.StereoCamera
- All Implemented Interfaces:
Savable
,Externalizable
,Serializable
Extension of Camera useful for tracking and updating a Stereo view camera. See
http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/stereorender/ for a useful discussion on stereo viewing in
OpenGL.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ardor3d.renderer.Camera
Camera.FrustumIntersect, Camera.ProjectionMode
-
Field Summary
Fields inherited from class com.ardor3d.renderer.Camera
_coeffBottom, _coeffLeft, _coeffRight, _coeffTop, _depthRangeDirty, _depthRangeFar, _depthRangeNear, _direction, _fovY, _frameDirty, _frustumBottom, _frustumDirty, _frustumFar, _frustumLeft, _frustumNear, _frustumRight, _frustumTop, _height, _left, _location, _matrixBuffer, _modelView, _planeQuantity, _projection, _tempVector, _up, _viewPortBottom, _viewPortDirty, _viewPortLeft, _viewPortRight, _viewPortTop, _width, _worldPlane, BOTTOM_PLANE, FAR_PLANE, FRUSTUM_PLANES, LEFT_PLANE, MAX_WORLD_PLANES, NEAR_PLANE, RIGHT_PLANE, TOP_PLANE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
double
double
boolean
void
resize
(int width, int height) Resizes this camera's view with the given width and height.void
setAperture
(double radians) void
setEyeSeparation
(double eyeSeparation) void
setFocalDistance
(double focalDistance) void
setSideBySideMode
(boolean sideBySideMode) void
void
void
void
Methods inherited from class com.ardor3d.renderer.Camera
apply, applyModelViewMatrix, applyProjectionMatrix, applyViewport, contains, getClassTag, getCurrentCamera, getDepthRangeFar, getDepthRangeNear, getDirection, getFovY, getFrustumBottom, getFrustumCoordinates, getFrustumCoordinates, getFrustumFar, getFrustumLeft, getFrustumNear, getFrustumRight, getFrustumTop, getHeight, getLeft, getLocation, getModelViewMatrix, getModelViewProjectionInverseMatrix, getModelViewProjectionMatrix, getNormalizedDeviceCoordinates, getNormalizedDeviceCoordinates, getPickRay, getPlaneState, getProjectionMatrix, getProjectionMode, getScreenCoordinates, getScreenCoordinates, getUp, getViewPortBottom, getViewPortLeft, getViewPortRight, getViewPortTop, getWidth, getWorldCoordinates, getWorldCoordinates, isFrameDirty, lookAt, lookAt, normalize, onFrameChange, onFrustumChange, onViewPortChange, read, readExternal, set, setAxes, setAxes, setDepthRangeFar, setDepthRangeNear, setDirection, setFrame, setFrame, setFrame, setFrustum, setFrustum, setFrustumBottom, setFrustumFar, setFrustumLeft, setFrustumNear, setFrustumPerspective, setFrustumRight, setFrustumTop, setLeft, setLocation, setLocation, setPlaneState, setProjectionMatrix, setProjectionMode, setUp, setViewPort, setViewPortBottom, setViewPortLeft, setViewPortRight, setViewPortTop, toString, update, updateModelViewMatrix, updateProjectionMatrix, write, writeExternal
-
Constructor Details
-
StereoCamera
public StereoCamera() -
StereoCamera
public StereoCamera(int width, int height) - Parameters:
width
- the widthheight
- the height
-
StereoCamera
-
-
Method Details
-
resize
public void resize(int width, int height) Description copied from class:Camera
Resizes this camera's view with the given width and height. -
isSideBySideMode
public boolean isSideBySideMode()- Returns:
- the sideBySideMode
- See Also:
-
setSideBySideMode
public void setSideBySideMode(boolean sideBySideMode) - Parameters:
sideBySideMode
- If true, left camera will be set up to the left half of the render context and right camera to the right half. If false, the views are set up to be the full size of the render context.
-
setupLeftRightCameras
public void setupLeftRightCameras() -
updateLeftRightCameraFrames
public void updateLeftRightCameraFrames() -
switchToLeftCamera
-
switchToRightCamera
-
getLeftCamera
- Returns:
- the leftCamera
-
getRightCamera
- Returns:
- the rightCamera
-
getFocalDistance
public double getFocalDistance()- Returns:
- the focalDistance
-
setFocalDistance
public void setFocalDistance(double focalDistance) - Parameters:
focalDistance
- the focalDistance to set
-
getEyeSeparation
public double getEyeSeparation()- Returns:
- the eyeSeparation
-
setEyeSeparation
public void setEyeSeparation(double eyeSeparation) - Parameters:
eyeSeparation
- the eyeSeparation to set
-
getAperture
public double getAperture()- Returns:
- the aperture
-
setAperture
public void setAperture(double radians) - Parameters:
radians
- the horizontal field of view, in radians
-