CopperLicht API Documentation
Class CL3D.CameraSceneNode
Scene Node which is a (controlable) camera.
Extends
CL3D.SceneNode.
Class Overview
CL3D.CameraSceneNode()
The scene is usually rendered from the currently active camera. Some cameras have an CL3D.Animator attached to
them which controlls the position and look target of the camera, for example a CL3D.AnimatorCameraFPS. You can
get access to this animator using camera.getAnimatorOfType('camerafps');.
Method Attributes | Method Name and Description |
---|---|
createClone(newparent, oldNodeId, newNodeId)
Creates a clone of the camera.
|
|
Gets the aspect ratio of the camera.
|
|
Gets the value of the far plane of the camera.
|
|
getFov()
Gets the field of view of the camera.
|
|
Gets the value of the near plane of the camera.
|
|
Sets target position of the camera.
|
|
getType()
Returns the type string of the scene node.
|
|
Returns the up vector of the camera.
|
|
Sets the aspect ratio of the camera.
|
|
setFarValue(nv)
Sets the value of the far plane of the camera.
|
|
setFov(fov)
Sets the field of view of the camera.
|
|
setNearValue(nv)
Sets the value of the near plane of the camera.
|
|
setTarget(target)
Sets target position of the camera.
|
|
setUpVector(upvector)
Sets up vector of the camera, a direction pointing to where 'up' is.
|
- Methods borrowed from class CL3D.SceneNode:
- addAnimator, addChild, getAbsolutePosition, getAbsoluteTransformation, getAnimatorOfType, getAnimators, getBoundingBox, getChildren, getMaterial, getMaterialCount, getParent, getRelativeTransformation, getTransformedBoundingBox, init, isActuallyVisible, OnAnimate, OnRegisterSceneNode, removeAnimator, removeChild, render, updateAbsolutePosition
Method Detail
createClone(newparent, oldNodeId, newNodeId)
Creates a clone of the camera.
- Parameters:
- {CL3D.SceneNode} newparent
- The new parent of the clone. Must be a scene node as well.
- oldNodeId
- newNodeId
getAspectRatio()
Gets the aspect ratio of the camera. The default is 4 / 3
getFarValue()
Gets the value of the far plane of the camera. All geometry behind this plane is clipped away.
getFov()
Gets the field of view of the camera. Field of view is measured in radians.
getNearValue()
Gets the value of the near plane of the camera. All geometry before this plane is clipped away.
{CL3D.Vect3d}
getTarget()
Sets target position of the camera.
- Returns:
- {CL3D.Vect3d} Target position of the camera.
{String}
getType()
Returns the type string of the scene node.
Returns 'camera' for the camera scene node.
- Returns:
- {String} type name of the scene node.
{CL3D.Vect3d}
getUpVector()
Returns the up vector of the camera. The default is (0,1,0), pointing up.
- Returns:
- {CL3D.Vect3d} Up vector of the camera.
setAspectRatio(a)
Sets the aspect ratio of the camera. The default is 4 / 3
- Parameters:
- a
setFarValue(nv)
Sets the value of the far plane of the camera. All geometry behind this plane is clipped away.
- Parameters:
- nv
setFov(fov)
Sets the field of view of the camera. Field of view is measured in radians.
- Parameters:
- fov
setNearValue(nv)
Sets the value of the near plane of the camera. All geometry before this plane is clipped away.
- Parameters:
- nv
setTarget(target)
Sets target position of the camera.
- Parameters:
- {CL3D.Vect3d} target
- new target position of the camera.
setUpVector(upvector)
Sets up vector of the camera, a direction pointing to where 'up' is. Default is (0,1,0)
- Parameters:
- {CL3D.Vect3d} upvector
- new up vector of the camera.