Class c3dl.Camera
c3dl.Camera is a base class for c3dl.OrbitCamera and c3dl.FreeCamera.
Defined in: camera.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
|
getDir()
Get the direction of the camera.
|
|
|
Get the far clipping plane.
|
|
|
Get the vertical field of view for this camera in degrees.
|
|
|
getLeft()
Get the left vector of the camera.
|
|
|
Get the near clipping plane.
|
|
|
Get the position of the camera.
|
|
|
getUp()
Get the up vector of the camera.
|
|
|
setFarClippingPlane(fcp)
The far clipping plane should not be set to an extremely large value.
|
|
|
setFieldOfView(fov)
Set the field of view for this camera in degrees.
|
|
|
setNearClippingPlane(ncp)
The near clipping plane must be set to a positive value.
|
|
|
toString(delimiter)
Get a string representation of this camera.
|
Method Detail
{Array}
getDir()
Get the direction of the camera.
- Returns:
- {Array} vector
{float}
getFarClippingPlane()
Get the far clipping plane.
- Returns:
- {float} far clipping plane value.
{float}
getFieldOfView()
Get the vertical field of view for this camera in degrees.
- Returns:
- {float} field of view is greater than 0 and less than 180.
{Array}
getLeft()
Get the left vector of the camera.
- Returns:
- {Array} vector
{float}
getNearClippingPlane()
Get the near clipping plane.
- Returns:
- {float} near clipping plane value.
{Array}
getPosition()
Get the position of the camera.
- Returns:
- {Array} A three element array which contains the position of the camera.
{Array}
getUp()
Get the up vector of the camera.
- Returns:
- {Array}
setFarClippingPlane(fcp)
The far clipping plane should not be set to an extremely large value. This
can create depth buffer precision problems such as z-fighting. see
http://www.opengl.org/resources/faq/technical/depthbuffer.htm for more information.
- Parameters:
- {float} fcp
- Must be larger than 0.
setFieldOfView(fov)
Set the field of view for this camera in degrees.
- Parameters:
- {float} fov
- Specified in degrees. Must be greater than 0 and less than 180.
setNearClippingPlane(ncp)
The near clipping plane must be set to a positive value.
- Parameters:
- {float} ncp
- Must be larger than 0.
{String}
toString(delimiter)
Get a string representation of this camera.
- Parameters:
- {String} delimiter Optional, Default: ","
- A string used to separate the member variables of the object.
- Returns:
- {String} a string representation of this class.