Viz Artist User Guide

Version 3.14 | Published October 30, 2020 ©

Mt3D Control

images/download/attachments/54008431/viz_icons_multitouch3dcontrol.png
The Mt3D Control plug-in moves, scales, and rotates an object in 3D.

The Mt3D Control plug-in provides an arc ball-like controller for the object it is attached to. When used with one finger, the object can be rotated. When multiple fingers are used, the object can be moved, rotated and scaled in a 2D plane (the same as the Mt2D Control).

Note: This plug-in is located in: Built Ins -> Container plug-ins -> MultiTouchComp

This page contains the following topics and procedures:

Mt3D Configuration

images/download/attachments/54008431/plugins_container_mt_3dcontrolwindow.png

  • Config: Selects 3D Config

  • Axis Lock: Constrains the rotation to a specific axis, or allow free rotation. Options are:

    • Off

    • X Axis

    • Y Axis

    • Z Axis

  • Axis Lock Local: Uses the local axis instead of the world axis if axis lock is on.

  • Active during screen wide telestration?: If the button to is to stay active when the screen-wide telestrator is on, set to On. The default is off, which means the button cannot be triggered when telestration is on.

  • Hit Coordinate Type: Selects the Coordinate system to use. Click either Local, World or Screen.

2D Configuration

images/download/attachments/54008431/plugins_container_mt_3dcontrolwindow2dconfig.png

  • Config: Selects configuration.

  • Momentum: Enables movement or rotation with momentum after the object is released.

    • Friction: Sets the amount of friction used when momentum is enabled

      Note: Using this feature conflicts with any externally scripted or other animations applied to the container.

  • Lock Translation: Allows only rotation and scaling of the object

  • Lock Translation (Screen X): Prevents movement left-to-right on the screen

  • Lock Translation (Screen Y): Prevents movement up-and-down on the screen

  • Lock Translation (Object X): Prevents movement along the object’s local X axis

  • Lock Translation (Object Y): Prevents movement along the object’s local Y axis

  • Lock Rotation: Prevents rotation of the object

  • Lock Scale: Prevents resizing of the object.

  • Active during screen wide telestration?: Determines whether the button to stays active when the screen-wide telestrator is on, when set to On. The default is Off, which means the button cannot be triggered when telestration is on.

  • Hit Coordinate Type: Selects the Coordinate system to use.Click either Local, World or Screen.

Output Configuration

images/download/attachments/54008431/plugins_container_mt3dcontrolwindowoutput.png

  • Config: Selects configuration.

  • Id: Gives additional context in the handler script, specify a string that identifies any notifications dispatched by this plug-in. This is often included as an argument for the event so a common script may handle events from a number of plug-ins.

  • Set Shared Memory: Enables shared memory to be updated for the plug-in notifications when set to On.

    • Shared Memory Prefix: This sets a ‘prefix name’ to be prepended to the shared memory variables maintained by the plug-ins notifications. For plug-ins that maintain multiple fields each field name has the prefix prepended to it followed by a dot ‘.’ so as to mimic member access to an object, i.e: if the prefix is ‘Obj’ the fields ‘field1’ and ‘field2’ would be identified with the strings ‘Obj.field1’ and ‘Obj.field2’. The shared memory field ‘Obj’ is also maintained and is simply an integer that is modified every time any of its ‘subfields’ is updated.

    • Shared Memory Type: Click either Global, Scene, or Distributed. This selects the shared memory area to update.

  • Set Data Pool: Shows ‘you wish’ plug-in notifications to set a Data Pool variable

    • Data Pool Variable: Shows the name of the Data Pool variable to have set.

  • Active during screen wide telestration?: Determines whether the button stays active when the screen-wide telestrator is on, when set to On. The default is Off, which means the button cannot be triggered when telestration is on.

  • Hit Coordinate Type: Selects the Coordinate system to use.Click either Local, World or Screen.

Events and Notifications

The events dispatched by Mt3dControl are:

OnGrab (when object is ‘grabbed’):

sub OnGrab (HitContainer as String, Id as String, HitPoint as Vertex, plug-inContainer as String, FirstChildContainer as String)

end sub

  • HitContainer as String

  • Id as String

  • HitPoint as Vertex

  • plug-inContainer as String

  • FirstChildContainer as String
    OnGrabUpdate (when object is moved):

sub OnGrabUpdate (HitContainer as String, Id as String, Position as Vertex, Rotation as Vertex, Scale as Vertex, Pressure as Double)

end sub

  • HitContainer as String

  • Id as String

  • Position as Vertex

  • Rotation as Vertex

  • Scale as Vertex

  • Pressure as Double
    OnGrabRelease (when object is “released”):

sub OnGrabRelease (HitContainer as String, Id as String)

end sub

  • HitContainer as String

  • Id as String

The Shared Memory Field names updated are:

  • HitContainer (the name of the container that was “hit”)

  • Id (the user ID string entered in the notification interface)

  • HitPoint

  • plug-inContainer

  • FirstChildContainer

  • Position

  • Rotation

  • Scale

  • Pressure

  • State

The Data Pool structure updated is:

  • Mt3dControl:

    • string HitContainer

    • string Id

    • string HitPoint

    • string plug-inContainer

    • string FirstChildContainer

    • string Position

    • string Rotation

    • string Scale

    • string Pressure

    • string State

To Create a Simple Scene with the Mt3D Control Plug-in

Note: If a touch screen is not available, set Multi Touch input to Mouse in the Communication section of Viz Configuration (see the Viz Engine Administrator Guide).

  1. Create a new Scene.

  2. Add a new group Container.

  3. Add a Cube Geometry to the Container.

  4. Add the Mt3D Control plug-in to the Container.

  5. Open the Scene in On Air. Use the touch input device to transform the object.

  6. Use the Mt3D Control plug-in editor to modify the plug-in behavior, as required.