Package com.ardor3d.util
Class ExtendedCamera
java.lang.Object
com.ardor3d.renderer.Camera
com.ardor3d.util.ExtendedCamera
- All Implemented Interfaces:
Savable
,Externalizable
,Serializable
Camera with additional pssm related functionality.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ardor3d.renderer.Camera
Camera.FrustumIntersect, Camera.ProjectionMode
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Vector3[]
The corners of the camera frustum.protected final Vector3
Temporary vector used for storing extents during corner calculations.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
ConstructorDescriptionInstantiates a new PSSM camera.ExtendedCamera
(int width, int height) Instantiates a new PSSM camera.ExtendedCamera
(Camera source) Instantiates a new PSSM camera. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
calculateFrustum
(double fNear, double fFar) Calculate frustum corners and center.Vector3[]
void
pack
(BoundingVolume sceneBounds) Compress this camera's near and far frustum planes to be smaller if possible, using the given bounds as a measure.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, resize, 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
-
Field Details
-
_corners
The corners of the camera frustum. -
_extents
Temporary vector used for storing extents during corner calculations.
-
-
Constructor Details
-
ExtendedCamera
public ExtendedCamera()Instantiates a new PSSM camera. -
ExtendedCamera
public ExtendedCamera(int width, int height) Instantiates a new PSSM camera.- Parameters:
width
- the widthheight
- the height
-
ExtendedCamera
Instantiates a new PSSM camera.- Parameters:
source
- the source
-
-
Method Details
-
pack
Compress this camera's near and far frustum planes to be smaller if possible, using the given bounds as a measure.- Parameters:
sceneBounds
- the scene bounds
-
calculateFrustum
public void calculateFrustum() -
calculateFrustum
public void calculateFrustum(double fNear, double fFar) Calculate frustum corners and center.- Parameters:
fNear
- the near distancefFar
- the far distance
-
getCorners
-