A newer version of Max is available. Click here to access the latest version of this document.

jit.gl.handle

Use mouse movement to control position/rotation

Description

object requires one argument: the name of a drawing context. A named drawing context is a named instance of a jit.window, jit.pwindow, or jit.matrix object which has an instance of the jit.gl.render object associated with it. This value may also be set via the OB3D drawto attribute. When the context is being drawn to a jit.window or jit.pwindow, jit.gl.handle responds to mouse clicks and drags in the destination by generating rotate and position messages out its left outlet. When these messages are sent to 3D objects, the objects can then be rotated and moved in space using the mouse.

If the messages from jit.gl.handle are sent directly to jit.gl.render, mouse motion has the effect of moving and rotating the entire 3D space defined by the renderer. In this setup, the inherit_transform attribute should be set to 1, so that the jit.gl.handle object does not move within the world as well.

While mouse input is present, the jit.gl.handle is drawn as circles around a sphere on the x, y, and z axes. Clicking and dragging on the sphere rotates connected objects. Dragging with the command key held moves the objects along the xy plane relative to the camera. Dragging with the option key held moves the objects towards and away from the camera.

Information for Jitter 3D Object (OB3D) messages and attributes to this object

Messages

reset Returns jit.gl.handle and attached objects to the original viewing origin and undoes all rotation.

Attributes

Name Type g/s Description
auto_rotate int Continue spinning along last rotation when no UI input is present (default = 0)
auto_time int The time between automatic rotations for auto_rotate (default = 0)
radius float The radius of control sphere in 3D world (default = 1.0)
rgb_axes int Sphere axis color flag (default = 1) When the flag is set, the sphere axes are drawn in RGB colors, Otherwise, the color attribute determines the color used.
tracking float The rotation amount relative to amount of mouse movement (default = 1.)
visible int Visibility flag (default = 1) When the flag is set, the sphere axes are visible in the 3D world.

Information for box attributes common to all objects

Examples

See Also

Name Description
jit.gl.graph Open GL floating-point data visualization
jit.gl.gridshape Generate simple geometric shapes as a connected grid
jit.gl.isosurf Generates a GL based surface extraction
jit.gl.mesh Generates GL geometry from existing data
jit.gl.model Read and draw Wavefront .obj models
jit.gl.nurbs Generate NURBS surface
jit.gl.plato Generate platonic solids
jit.gl.render Render Open GL
jit.gl.shader Manages a GL shader
jit.gl.sketch GL parallel to lcd
jit.gl.slab Performs a GL accelerated grid-based evaluation
jit.gl.text2d Write bitmap text
jit.gl.text3d Write vector text
jit.gl.texture Manages a GL texture
jit.gl.videoplane GL accelerated video plane
jit.gl.volume Creates a GL accelerated volume vizualization
Tutorial 32: Camera View Tutorial 32: Camera View
Tutorial 36: 3D Models Tutorial 36: 3D Models