Coppercube API Documentation
Class CameraSceneNode
Scene Node which is a (controlable) camera.
Extends
SceneNode.
Class Overview
CameraSceneNode()
The scene is usually rendered from the currently active camera. Some cameras have an Animator attached to
them which controlls the position and look target of the camera, for example a AnimatorCameraFPS. You can
get access to this animator using camera.getAnimatorOfType('camerafps');.
Method Attributes | Method Name and Description |
---|---|
createClone(newparent)
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 SceneNode:
- addAnimator, addChild, getAbsolutePosition, getAbsoluteTransformation, getAnimatorOfType, getAnimators, getBoundingBox, getMaterial, getMaterialCount, getParent, getRelativeTransformation, getTransformedBoundingBox, init, OnAnimate, OnRegisterSceneNode, removeAnimator, removeChild, render, updateAbsolutePosition
Method Detail
createClone(newparent)
Creates a clone of the camera.
- Parameters:
- newparent
- The new parent of the clone. Must be a scene node as well.
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.
{Vect3d}
getTarget()
Sets target position of the camera.
- Returns:
- {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.
{Vect3d}
getUpVector()
Returns the up vector of the camera. The default is (0,1,0), pointing up.
- Returns:
- {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:
- target
- {Vect3d} 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:
- upvector
- {Vect3d} new up vector of the camera.