Drag[en]gine Script Module DragonScript
1.23
|
Rotate camera director. More...
Public Member Functions | |
int | getButton () |
Mouse button to track. More... | |
bool | getClampAzimuth () |
Clamp azimuth. More... | |
ElementCameraDirector | getDirector () |
Camera director to update. More... | |
float | getMaximumAzimuth () |
Maximum azimuth in degrees if clamping is enabled. More... | |
float | getMaximumElevation () |
Maximum elevation in degrees. More... | |
float | getMinimumAzimuth () |
Maximum azimuth in degrees if clamping is enabled. More... | |
float | getMinimumElevation () |
Minimum elevation in degrees. More... | |
int | getModifiers () |
Modifiers to track. More... | |
float | getRotationSpeedAzimuth () |
Azimuth rotation speed in degrees per pixel. More... | |
float | getRotationSpeedElevation () |
Elevation rotation speed in degrees per pixel. More... | |
RotateCameraMouseListener | new (ElementCameraDirector director) |
Create mouse listener tracking right mouse button with no modifiers. More... | |
RotateCameraMouseListener | new (ElementCameraDirector director, int trackButton, int modifiers) |
Create mouse listener. More... | |
void | onButtonPress (MouseEvent event) |
Mouse button pressed. More... | |
void | onButtonRelease (MouseEvent event) |
Mouse button release. More... | |
void | onMouseMove (MouseEvent event) |
Mouse moved. More... | |
void | setClampAzimuth (bool clamp) |
Set to clamp azimuth. More... | |
void | setMaximumAzimuth (float azimuth) |
Set maximum azimuth in degrees if clamping is enabled. More... | |
void | setMaximumElevation (float elevation) |
Set maximum elevation in degrees. More... | |
void | setMinimumAzimuth (float azimuth) |
Set maximum azimuth in degrees if clamping is enabled. More... | |
void | setMinimumElevation (float elevation) |
Set minimum elevation in degrees. More... | |
void | setRotationSpeedAzimuth (float speed) |
Set azimuth rotation speed in degrees per pixel. More... | |
void | setRotationSpeedElevation (float speed) |
Set elevation rotation speed in degrees per pixel. More... | |
Public Member Functions inherited from Dragengine.Gui.Events.DefaultMouseListener | |
DefaultMouseListener | new () |
Create default mouse listener. More... | |
void | onMouseEnter (MouseEvent event) |
Mouse has entered widget. More... | |
void | onMouseLeave (MouseEvent event) |
Mouse has left widget. More... | |
void | onMouseWheel (MouseEvent event) |
Mouse wheel moved. More... | |
Protected Member Functions | |
void | onRotate () |
Camera director has been rotated. More... | |
void | onStartRotate () |
Start rotating camera director. More... | |
void | onStopRotate () |
Stop rotating camera director. More... | |
Rotate camera director.
Set mouse button and modifiers required to trigger the listener. Once triggered moving left and right is translated to changes in camera director azimuth while moving up and down is translated to changes in camera director elevation.
The elevation is clamped to the range from -90 to 90 while the azimuth is free to rotate. Optionally the azimuth can be clamped too.
The camera director is not required to have an element assigned.
int Dragengine.Gui.RotateCameraMouseListener.getButton | ( | ) |
Mouse button to track.
bool Dragengine.Gui.RotateCameraMouseListener.getClampAzimuth | ( | ) |
Clamp azimuth.
ElementCameraDirector Dragengine.Gui.RotateCameraMouseListener.getDirector | ( | ) |
Camera director to update.
float Dragengine.Gui.RotateCameraMouseListener.getMaximumAzimuth | ( | ) |
Maximum azimuth in degrees if clamping is enabled.
float Dragengine.Gui.RotateCameraMouseListener.getMaximumElevation | ( | ) |
Maximum elevation in degrees.
float Dragengine.Gui.RotateCameraMouseListener.getMinimumAzimuth | ( | ) |
Maximum azimuth in degrees if clamping is enabled.
float Dragengine.Gui.RotateCameraMouseListener.getMinimumElevation | ( | ) |
Minimum elevation in degrees.
int Dragengine.Gui.RotateCameraMouseListener.getModifiers | ( | ) |
Modifiers to track.
float Dragengine.Gui.RotateCameraMouseListener.getRotationSpeedAzimuth | ( | ) |
Azimuth rotation speed in degrees per pixel.
Negative speed rotates in the opposite direction.
float Dragengine.Gui.RotateCameraMouseListener.getRotationSpeedElevation | ( | ) |
Elevation rotation speed in degrees per pixel.
Negative speed rotates in the opposite direction.
RotateCameraMouseListener Dragengine.Gui.RotateCameraMouseListener.new | ( | ElementCameraDirector | director | ) |
Create mouse listener tracking right mouse button with no modifiers.
director | Camera director to update. |
RotateCameraMouseListener Dragengine.Gui.RotateCameraMouseListener.new | ( | ElementCameraDirector | director, |
int | trackButton, | ||
int | modifiers | ||
) |
Create mouse listener.
director | Camera director to update. |
trackButton | Value from InputEventMouseButton or custom. |
modifiers | Modifiers from InputEventModifier or custom. |
void Dragengine.Gui.RotateCameraMouseListener.onButtonPress | ( | MouseEvent | event | ) |
Mouse button pressed.
Captures mouse and starts tracking if button and modifiers match.
Reimplemented from Dragengine.Gui.Events.DefaultMouseListener.
void Dragengine.Gui.RotateCameraMouseListener.onButtonRelease | ( | MouseEvent | event | ) |
Mouse button release.
If tracking stop tracking and release mouse capture.
Reimplemented from Dragengine.Gui.Events.DefaultMouseListener.
void Dragengine.Gui.RotateCameraMouseListener.onMouseMove | ( | MouseEvent | event | ) |
Mouse moved.
Rotate camera if tracking.
Reimplemented from Dragengine.Gui.Events.DefaultMouseListener.
|
protected |
Camera director has been rotated.
|
protected |
Start rotating camera director.
|
protected |
Stop rotating camera director.
void Dragengine.Gui.RotateCameraMouseListener.setClampAzimuth | ( | bool | clamp | ) |
Set to clamp azimuth.
void Dragengine.Gui.RotateCameraMouseListener.setMaximumAzimuth | ( | float | azimuth | ) |
Set maximum azimuth in degrees if clamping is enabled.
void Dragengine.Gui.RotateCameraMouseListener.setMaximumElevation | ( | float | elevation | ) |
Set maximum elevation in degrees.
void Dragengine.Gui.RotateCameraMouseListener.setMinimumAzimuth | ( | float | azimuth | ) |
Set maximum azimuth in degrees if clamping is enabled.
void Dragengine.Gui.RotateCameraMouseListener.setMinimumElevation | ( | float | elevation | ) |
Set minimum elevation in degrees.
void Dragengine.Gui.RotateCameraMouseListener.setRotationSpeedAzimuth | ( | float | speed | ) |
Set azimuth rotation speed in degrees per pixel.
Negative speed rotates in the opposite direction.
void Dragengine.Gui.RotateCameraMouseListener.setRotationSpeedElevation | ( | float | speed | ) |
Set elevation rotation speed in degrees per pixel.
Negative speed rotates in the opposite direction.