Coppercube API Documentation
Class AnimatorCameraModelViewer
Special scene node animator for model viewer cameras.
Extends
Animator.
Class Overview
AnimatorCameraModelViewer(cam, engine)
Special scene node animator making cameras user controlled model viewrs around a pivot point on a fixed radius.
This scene node animator can be attached to a CameraSceneNode to make it act like a user controlled model viewer.
Simply set the target of the camera to the pivot point and attach this animator to make it work.
- Parameters:
- cam
- an instance of a CameraSceneNode this animator will be attached to. Can be null if the camera is not yet known.
- engine
- An instance of the CopperLicht 3d engine, for receiving the mouse and keyboard input.
Field Attributes | Field Name and Description |
---|---|
Defines if the animator may only move the camera horizontally
|
|
Radius of the camera
|
|
Rotation speed of the camera
|
Method Attributes | Method Name and Description |
---|---|
animateNode(n, timeMs)
Animates the scene node it is attached to and returns true if scene node was modified.
|
|
getType()
Returns the type of the animator.
|
- Methods borrowed from class Animator:
- onKeyDown, onKeyUp, onMouseDown, onMouseMove, onMouseUp, onMouseWheel
Field Detail
{Boolean}
NoVerticalMovement
Defines if the animator may only move the camera horizontally
- Default Value:
- false
{Number}
Radius
Radius of the camera
- Default Value:
- 100
{Number}
RotateSpeed
Rotation speed of the camera
- Default Value:
- 0.06
Method Detail
animateNode(n, timeMs)
Animates the scene node it is attached to and returns true if scene node was modified.
- Parameters:
- n
- The Scene node which needs to be animated this frame.
- timeMs
- The time in milliseconds since the start of the scene.
getType()
Returns the type of the animator.
For the AnimatorCameraModelViewer, this will return 'cameramodelviewer'.