| Package | alternativa.engine3d.controllers |
| Class | public class CameraController |
| Property | Defined by | ||
|---|---|---|---|
| camera : Camera3D
Currently controlled camera.
| CameraController | ||
| checkCollisions : Boolean Enable collision detection mode.
| CameraController | ||
| collisionIgnoreSet : Set
[read-only] Objects set to be exluded from collision detection.
| CameraController | ||
| collisionRadius : Number Collision detection sphere radius.
| CameraController | ||
| controlsEnabled : Boolean Camera control activity.
| CameraController | ||
| eventsSource : DisplayObject The sourse of keyboard and mouse events.
| CameraController | ||
| fovStep : Number Base step to use in field of view (FOV) changes, in radians.
| CameraController | ||
| mousePitch : Number Radians per pixel mouse PITCH speed.
| CameraController | ||
| mouseSensitivity : Number Mouse sensivity.
| CameraController | ||
| mouseYaw : Number Radians per pixel mouse YAW speed.
| CameraController | ||
| moveLocal : Boolean Mouse move mode.
| CameraController | ||
| onStartMoving : Function Callback
| CameraController | ||
| onStopMoving : Function Callback function to be called when camera stops moving.
| CameraController | ||
| pitchSpeed : Number Pitch angle speed when controlling from keyboard (radians per second).
| CameraController | ||
| speed : Number Speed value (units per second).
| CameraController | ||
| speedMultiplier : Number Speed multiplier on acceleration.
| CameraController | ||
| yawSpeed : Number Yaw angle speed when controlling from keyboard (radians per second).
| CameraController | ||
| zoomMultiplier : Number Zoom acceleration coefficient.
| CameraController | ||
| Method | Defined by | ||
|---|---|---|---|
|
CameraController(eventsSourceObject:DisplayObject)
Create a class instance.
| CameraController | ||
|
accelerate(value:Boolean):void
Activate of accelerated speed mode.
| CameraController | ||
|
back(value:Boolean):void
Activate camera back movement.
| CameraController | ||
|
bindKey(keyCode:uint, action:String):void
Connect button with action
| CameraController | ||
|
down(value:Boolean):void
Activate camera down movement.
| CameraController | ||
|
forward(value:Boolean):void
Activate camera forward movement.
| CameraController | ||
|
left(value:Boolean):void
Activate camera left movement.
| CameraController | ||
|
Targeting camera to the given point.
| CameraController | ||
|
pitchDown(value:Boolean):void
Activate camera pitch down.
| CameraController | ||
|
pitchUp(value:Boolean):void
Activate camera pitch up.
| CameraController | ||
|
processInput():void
Input processing.
| CameraController | ||
|
right(value:Boolean):void
Activate camera right movement.
| CameraController | ||
|
setDefaultBindings():void
Set default key bindings.
| CameraController | ||
|
unbindAll():void
Clear all key bindings.
| CameraController | ||
|
unbindKey(keyCode:uint):void
Clear key binding.
| CameraController | ||
|
up(value:Boolean):void
Activate camera up movement.
| CameraController | ||
|
yawLeft(value:Boolean):void
Activate camera yaw left.
| CameraController | ||
|
yawRight(value:Boolean):void
Activate camera yaw right.
| CameraController | ||
| Constant | Defined by | ||
|---|---|---|---|
| ACTION_ACCELERATE : String = "ACTION_ACCELERATE" [static] Action name for binding ACCELERATE button.
| CameraController | ||
| ACTION_BACK : String = "ACTION_BACK" [static] Action name for binding BACK movement button.
| CameraController | ||
| ACTION_DOWN : String = "ACTION_DOWN" [static] Action name for binding DOWN movement button.
| CameraController | ||
| ACTION_FORWARD : String = "ACTION_FORWARD" [static] Action name for binding FORWARD movement button.
| CameraController | ||
| ACTION_LEFT : String = "ACTION_LEFT" [static] Action name for binding LEFT movement button.
| CameraController | ||
| ACTION_PITCH_DOWN : String = "ACTION_PITCH_DOWN" [static] Action name for binding PITCH DOWN movement button.
| CameraController | ||
| ACTION_PITCH_UP : String = "ACTION_PITCH_UP" [static] Action name for binding PITCH UP movement button.
| CameraController | ||
| ACTION_RIGHT : String = "ACTION_RIGHT" [static] Action name for binding RIGHT movement button.
| CameraController | ||
| ACTION_UP : String = "ACTION_UP" [static] Action name for binding UP movement button.
| CameraController | ||
| ACTION_YAW_LEFT : String = "ACTION_YAW_LEFT" [static] Action name for binding YAW LEFT movement angle (rotate left) button.
| CameraController | ||
| ACTION_YAW_RIGHT : String = "ACTION_YAW_RIGHT" [static] Action name for binding YAW RIGHT movement angle (rotate right) button.
| CameraController | ||
| camera | property |
camera:Camera3D [read-write]Currently controlled camera.
Implementation public function get camera():Camera3D
public function set camera(value:Camera3D):void
| checkCollisions | property |
checkCollisions:Boolean [read-write]Enable collision detection mode. The property is not set until camera is placed on scene.
Implementation public function get checkCollisions():Boolean
public function set checkCollisions(value:Boolean):void
| collisionIgnoreSet | property |
collisionIgnoreSet:Set [read-only]Objects set to be exluded from collision detection.
Implementation public function get collisionIgnoreSet():Set
| collisionRadius | property |
collisionRadius:Number [read-write]Collision detection sphere radius.
The default value is 0.
public function get collisionRadius():Number
public function set collisionRadius(value:Number):void
| controlsEnabled | property |
controlsEnabled:Boolean [read-write]Camera control activity.
The default value is false.
public function get controlsEnabled():Boolean
public function set controlsEnabled(value:Boolean):void
| eventsSource | property |
eventsSource:DisplayObject [read-write]The sourse of keyboard and mouse events.
Implementation public function get eventsSource():DisplayObject
public function set eventsSource(value:DisplayObject):void
ArgumentError — throws if specified value is null |
| fovStep | property |
fovStep:Number [read-write]Base step to use in field of view (FOV) changes, in radians. Real step is being calculated by multiplying this value on MouseEvent.delta.
The default value is Math.PI / 180.
public function get fovStep():Number
public function set fovStep(value:Number):void
| mousePitch | property |
mousePitch:Number [read-write]Radians per pixel mouse PITCH speed.
The default value is Math.PI / 360.
public function get mousePitch():Number
public function set mousePitch(value:Number):void
| mouseSensitivity | property |
mouseSensitivity:Number [read-write]Mouse sensivity.
The default value is 1.
public function get mouseSensitivity():Number
public function set mouseSensitivity(value:Number):void
See also
| mouseYaw | property |
mouseYaw:Number [read-write]Radians per pixel mouse YAW speed.
The default value is Math.PI / 360.
public function get mouseYaw():Number
public function set mouseYaw(value:Number):void
| moveLocal | property |
moveLocal:Boolean [read-write]Mouse move mode. If true, uses local coordinates, otherwise uses global coordinates system.
The default value is true.
public function get moveLocal():Boolean
public function set moveLocal(value:Boolean):void
| onStartMoving | property |
onStartMoving:Function [read-write]Callback
Implementation public function get onStartMoving():Function
public function set onStartMoving(value:Function):void
| onStopMoving | property |
onStopMoving:Function [read-write]Callback function to be called when camera stops moving.
Implementation public function get onStopMoving():Function
public function set onStopMoving(value:Function):void
| pitchSpeed | property |
pitchSpeed:Number [read-write]Pitch angle speed when controlling from keyboard (radians per second).
The default value is 1.
public function get pitchSpeed():Number
public function set pitchSpeed(value:Number):void
| speed | property |
speed:Number [read-write]Speed value (units per second).
Implementation public function get speed():Number
public function set speed(value:Number):void
| speedMultiplier | property |
speedMultiplier:Number [read-write]Speed multiplier on acceleration.
The default value is 2.
public function get speedMultiplier():Number
public function set speedMultiplier(value:Number):void
| yawSpeed | property |
yawSpeed:Number [read-write]Yaw angle speed when controlling from keyboard (radians per second).
The default value is 1.
public function get yawSpeed():Number
public function set yawSpeed(value:Number):void
| zoomMultiplier | property |
zoomMultiplier:Number [read-write]Zoom acceleration coefficient.
The default value is 0.1.
public function get zoomMultiplier():Number
public function set zoomMultiplier(value:Number):void
| CameraController | () | constructor |
public function CameraController(eventsSourceObject:DisplayObject)Create a class instance.
ParameterseventsSourceObject:DisplayObject — object that is being used for mouse and keyboard events |
ArgumentError — throws if eventsSourceObject is null |
| accelerate | () | method |
public function accelerate(value:Boolean):voidActivate of accelerated speed mode.
Parametersvalue:Boolean — true to turn on accelerated mode, false to turn it off |
| back | () | method |
public function back(value:Boolean):voidActivate camera back movement.
Parametersvalue:Boolean — true to start movement, false to stop movement |
| bindKey | () | method |
public function bindKey(keyCode:uint, action:String):voidConnect button with action
ParameterskeyCode:uint — key code |
|
action:String — action name |
| down | () | method |
public function down(value:Boolean):voidActivate camera down movement.
Parametersvalue:Boolean — true to start movement, false to stop movement |
| forward | () | method |
public function forward(value:Boolean):voidActivate camera forward movement.
Parametersvalue:Boolean — true to start movement, false to stop movement |
| left | () | method |
public function left(value:Boolean):voidActivate camera left movement.
Parametersvalue:Boolean — true to start movement, false to stop movement |
| lookAt | () | method |
public function lookAt(point:Point3D):voidTargeting camera to the given point.
Parameterspoint:Point3D — camera target point |
| pitchDown | () | method |
public function pitchDown(value:Boolean):voidActivate camera pitch down.
Parametersvalue:Boolean — true to start movement, false to stop movement |
| pitchUp | () | method |
public function pitchUp(value:Boolean):voidActivate camera pitch up.
Parametersvalue:Boolean — true to start movement, false to stop movement |
| processInput | () | method |
public function processInput():voidInput processing. Method must be used every frame before calling Scene3D.calculate().
See also
| right | () | method |
public function right(value:Boolean):voidActivate camera right movement.
Parametersvalue:Boolean — true to start movement, false to stop movement |
| setDefaultBindings | () | method |
public function setDefaultBindings():voidSet default key bindings. This method clears previous bindings and sets following:
| unbindAll | () | method |
public function unbindAll():voidClear all key bindings.
| unbindKey | () | method |
public function unbindKey(keyCode:uint):voidClear key binding.
ParameterskeyCode:uint — key code |
| up | () | method |
public function up(value:Boolean):voidActivate camera up movement.
Parametersvalue:Boolean — true to start movement, false to stop movement |
| yawLeft | () | method |
public function yawLeft(value:Boolean):voidActivate camera yaw left.
Parametersvalue:Boolean — true to start movement, false to stop movement |
| yawRight | () | method |
public function yawRight(value:Boolean):voidActivate camera yaw right.
Parametersvalue:Boolean — true to start movement, false to stop movement |
| ACTION_ACCELERATE | constant |
public static const ACTION_ACCELERATE:String = "ACTION_ACCELERATE"Action name for binding ACCELERATE button.
| ACTION_BACK | constant |
public static const ACTION_BACK:String = "ACTION_BACK"Action name for binding BACK movement button.
| ACTION_DOWN | constant |
public static const ACTION_DOWN:String = "ACTION_DOWN"Action name for binding DOWN movement button.
| ACTION_FORWARD | constant |
public static const ACTION_FORWARD:String = "ACTION_FORWARD"Action name for binding FORWARD movement button.
| ACTION_LEFT | constant |
public static const ACTION_LEFT:String = "ACTION_LEFT"Action name for binding LEFT movement button.
| ACTION_PITCH_DOWN | constant |
public static const ACTION_PITCH_DOWN:String = "ACTION_PITCH_DOWN"Action name for binding PITCH DOWN movement button.
| ACTION_PITCH_UP | constant |
public static const ACTION_PITCH_UP:String = "ACTION_PITCH_UP"Action name for binding PITCH UP movement button.
| ACTION_RIGHT | constant |
public static const ACTION_RIGHT:String = "ACTION_RIGHT"Action name for binding RIGHT movement button.
| ACTION_UP | constant |
public static const ACTION_UP:String = "ACTION_UP"Action name for binding UP movement button.
| ACTION_YAW_LEFT | constant |
public static const ACTION_YAW_LEFT:String = "ACTION_YAW_LEFT"Action name for binding YAW LEFT movement angle (rotate left) button.
| ACTION_YAW_RIGHT | constant |
public static const ACTION_YAW_RIGHT:String = "ACTION_YAW_RIGHT"Action name for binding YAW RIGHT movement angle (rotate right) button.