Manipulator
Helper that enables camera interaction similar to sketchfab or Google Maps.
Clients notify the manipulator of various mouse or touch events, then periodically call getLookAt so that they can adjust their camera. Three modes are supported: Mode.ORBIT, Mode.MAP, and Mode.FLIGHT. To construct a manipulator, use Builder and pass the desired mode to Builder.build.
Usage example:
val manip = Manipulator.Builder()
.viewport(1024, 768)
.build(Manipulator.Mode.ORBIT)
// In mouse-down handler:
manip.grabBegin(x, y, false)
// In mouse-move handler:
manip.grabUpdate(x, y)
// In mouse-up handler:
manip.grabEnd()
// Each frame:
val eye = FloatArray(3); val target = FloatArray(3); val up = FloatArray(3)
manip.getLookAt(eye, target, up)
camera.lookAt(eye[0], eye[1], eye[2], target[0], target[1], target[2], up[0], up[1], up[2])See also
Helper that enables camera interaction similar to sketchfab or Google Maps.
Clients notify the manipulator of various mouse or touch events, then periodically call getLookAt so that they can adjust their camera. Three modes are supported: Mode.ORBIT, Mode.MAP, and Mode.FLIGHT. To construct a manipulator, use Builder and pass the desired mode to Builder.build.
Usage example:
val manip = Manipulator.Builder()
.viewport(1024, 768)
.build(Manipulator.Mode.ORBIT)
// In mouse-down handler:
manip.grabBegin(x, y, false)
// In mouse-move handler:
manip.grabUpdate(x, y)
// In mouse-up handler:
manip.grabEnd()
// Each frame:
val eye = FloatArray(3); val target = FloatArray(3); val up = FloatArray(3)
manip.getLookAt(eye, target, up)
camera.lookAt(eye[0], eye[1], eye[2], target[0], target[1], target[2], up[0], up[1], up[2])See also
Helper that enables camera interaction similar to sketchfab or Google Maps.
Clients notify the manipulator of various mouse or touch events, then periodically call getLookAt so that they can adjust their camera. Three modes are supported: Mode.ORBIT, Mode.MAP, and Mode.FLIGHT. To construct a manipulator, use Builder and pass the desired mode to Builder.build.
Usage example:
val manip = Manipulator.Builder()
.viewport(1024, 768)
.build(Manipulator.Mode.ORBIT)
// In mouse-down handler:
manip.grabBegin(x, y, false)
// In mouse-move handler:
manip.grabUpdate(x, y)
// In mouse-up handler:
manip.grabEnd()
// Each frame:
val eye = FloatArray(3); val target = FloatArray(3); val up = FloatArray(3)
manip.getLookAt(eye, target, up)
camera.lookAt(eye[0], eye[1], eye[2], target[0], target[1], target[2], up[0], up[1], up[2])See also
Helper that enables camera interaction similar to sketchfab or Google Maps.
Clients notify the manipulator of various mouse or touch events, then periodically call getLookAt so that they can adjust their camera. Three modes are supported: Mode.ORBIT, Mode.MAP, and Mode.FLIGHT. To construct a manipulator, use Builder and pass the desired mode to Builder.build.
Usage example:
val manip = Manipulator.Builder()
.viewport(1024, 768)
.build(Manipulator.Mode.ORBIT)
// In mouse-down handler:
manip.grabBegin(x, y, false)
// In mouse-move handler:
manip.grabUpdate(x, y)
// In mouse-up handler:
manip.grabEnd()
// Each frame:
val eye = FloatArray(3); val target = FloatArray(3); val up = FloatArray(3)
manip.getLookAt(eye, target, up)
camera.lookAt(eye[0], eye[1], eye[2], target[0], target[1], target[2], up[0], up[1], up[2])See also
Helper that enables camera interaction similar to sketchfab or Google Maps.
Clients notify the manipulator of various mouse or touch events, then periodically call getLookAt so that they can adjust their camera. Three modes are supported: Mode.ORBIT, Mode.MAP, and Mode.FLIGHT. To construct a manipulator, use Builder and pass the desired mode to Builder.build.
Usage example:
val manip = Manipulator.Builder()
.viewport(1024, 768)
.build(Manipulator.Mode.ORBIT)
// In mouse-down handler:
manip.grabBegin(x, y, false)
// In mouse-move handler:
manip.grabUpdate(x, y)
// In mouse-up handler:
manip.grabEnd()
// Each frame:
val eye = FloatArray(3); val target = FloatArray(3); val up = FloatArray(3)
manip.getLookAt(eye, target, up)
camera.lookAt(eye[0], eye[1], eye[2], target[0], target[1], target[2], up[0], up[1], up[2])See also
Types
Opaque handle to a viewing position and orientation, used to animate the camera.
Opaque handle to a viewing position and orientation, used to animate the camera.
Opaque handle to a viewing position and orientation, used to animate the camera.
Opaque handle to a viewing position and orientation, used to animate the camera.
Opaque handle to a viewing position and orientation, used to animate the camera.
Builder for Manipulator instances.
Builder for Manipulator instances.
Builder for Manipulator instances.
Builder for Manipulator instances.
Builder for Manipulator instances.
The axis held constant when the viewport changes in MAP mode.
The axis held constant when the viewport changes in MAP mode.
The axis held constant when the viewport changes in MAP mode.
The axis held constant when the viewport changes in MAP mode.
The axis held constant when the viewport changes in MAP mode.
Keys used to translate the camera in Mode.FLIGHT mode.
Keys used to translate the camera in Mode.FLIGHT mode.
Keys used to translate the camera in Mode.FLIGHT mode.
Keys used to translate the camera in Mode.FLIGHT mode.
Keys used to translate the camera in Mode.FLIGHT mode.
Camera manipulation mode.
Camera manipulation mode.
Camera manipulation mode.
Camera manipulation mode.
Camera manipulation mode.
Functions
Destroys the manipulator and releases all resources.
Destroys the manipulator and releases all resources.
Destroys the manipulator and releases all resources.
Destroys the manipulator and releases all resources.
Destroys the manipulator and releases all resources.
Gets a handle that can be used to reset the manipulator back to its current position.
Gets a handle that can be used to reset the manipulator back to its current position.
Gets a handle that can be used to reset the manipulator back to its current position.
Gets a handle that can be used to reset the manipulator back to its current position.
Gets a handle that can be used to reset the manipulator back to its current position.
Gets a handle that can be used to reset the manipulator back to its home position.
Gets a handle that can be used to reset the manipulator back to its home position.
Gets a handle that can be used to reset the manipulator back to its home position.
Gets a handle that can be used to reset the manipulator back to its home position.
Gets a handle that can be used to reset the manipulator back to its home position.
Gets the current orthonormal basis; this is usually called once per frame.
Gets the current orthonormal basis; this is usually called once per frame.
Gets the current orthonormal basis; this is usually called once per frame.
Gets the current orthonormal basis; this is usually called once per frame.
Gets the current orthonormal basis; this is usually called once per frame.
Gets the immutable mode of the manipulator.
Gets the immutable mode of the manipulator.
Gets the immutable mode of the manipulator.
Gets the immutable mode of the manipulator.
Gets the immutable mode of the manipulator.
Starts a grabbing session (i.e. the user begins dragging in the viewport).
Starts a grabbing session (i.e. the user begins dragging in the viewport).
Starts a grabbing session (i.e. the user begins dragging in the viewport).
Starts a grabbing session (i.e. the user begins dragging in the viewport).
Updates a grabbing session.
Updates a grabbing session.
Updates a grabbing session.
Updates a grabbing session.
Updates a grabbing session.
Sets the manipulator position and orientation back to a previously stashed state.
Sets the manipulator position and orientation back to a previously stashed state.
Sets the manipulator position and orientation back to a previously stashed state.
Sets the manipulator position and orientation back to a previously stashed state.
Sets the manipulator position and orientation back to a previously stashed state.
Signals that a key is now in the down state.
Signals that a key is now in the down state.
Signals that a key is now in the down state.
Signals that a key is now in the down state.
Signals that a key is now in the down state.
Signals that a key is now in the up state.
Signals that a key is now in the up state.
Signals that a key is now in the up state.
Signals that a key is now in the up state.
Signals that a key is now in the up state.
Given a viewport coordinate, picks a point in the ground plane, or in the actual scene if a raycast callback was configured.
Given a viewport coordinate, picks a point in the ground plane, or in the actual scene if a raycast callback was configured.
Given a viewport coordinate, picks a point in the ground plane, or in the actual scene if a raycast callback was configured.
Given a viewport coordinate, picks a point in the ground plane, or in the actual scene if a raycast callback was configured.
Given a viewport coordinate, picks a point in the ground plane, or in the actual scene if a raycast callback was configured.
In Mode.MAP and Mode.ORBIT modes, dollys the camera along the viewing direction. In Mode.FLIGHT mode, adjusts the move speed of the camera.
In Mode.MAP and Mode.ORBIT modes, dollys the camera along the viewing direction. In Mode.FLIGHT mode, adjusts the move speed of the camera.
In Mode.MAP and Mode.ORBIT modes, dollys the camera along the viewing direction. In Mode.FLIGHT mode, adjusts the move speed of the camera.
In Mode.MAP and Mode.ORBIT modes, dollys the camera along the viewing direction. In Mode.FLIGHT mode, adjusts the move speed of the camera.
In Mode.MAP and Mode.ORBIT modes, dollys the camera along the viewing direction. In Mode.FLIGHT mode, adjusts the move speed of the camera.
Sets the viewport dimensions. The manipulator uses this to process grab events and raycasts.
Sets the viewport dimensions. The manipulator uses this to process grab events and raycasts.
Sets the viewport dimensions. The manipulator uses this to process grab events and raycasts.
Sets the viewport dimensions. The manipulator uses this to process grab events and raycasts.
Sets the viewport dimensions. The manipulator uses this to process grab events and raycasts.