InterModel

InterModel is a class that represents the parameters that are passed to an interaction.
If you want to execute an interaction that receives a string for a name for example, you will have to create an InterModel object with the value that is going to be read in the interaction.
Example:
local im = InterModel.newIM();
im:setValueFromOverlay(nameEditbox);
Arena:setOnLoadListener(Arena,"setName", im);

This object will get the value from the overlay 'nameEditbox' and will passe it to the interaction when the listener is triggered.

Method Summary
 nilclearArguments ()
 array{}getArguments ()
 nilprint ()
 nilsetListenerAbsolutePosition (string name)
 nilsetListenerAbsolutePositionX (string name)
 nilsetListenerAbsolutePositionY (string name)
 nilsetListenerAbsolutePositionZ (string name)
 nilsetListenerAbsoluteRaySourcePosition (string name)
 nilsetListenerAbsoluteRaySourcePositionX (string name)
 nilsetListenerAbsoluteRaySourcePositionY (string name)
 nilsetListenerAbsoluteRaySourcePositionZ (string name)
 nilsetListenerDeltaMove (string name)
 nilsetListenerDeltaMoveX (string name)
 nilsetListenerDeltaMoveY (string name)
 nilsetListenerDeltaMoveZ (string name)
 nilsetListenerMousePosition (string name)
 nilsetListenerMousePositionX (string name)
 nilsetListenerMousePositionY (string name)
 nilsetListenerPosition (string name)
 nilsetListenerPositionX (string name)
 nilsetListenerPositionY (string name)
 nilsetListenerPositionZ (string name)
 nilsetListenerRayDirection (string name)
 nilsetListenerRayDirectionX (string name)
 nilsetListenerRayDirectionY (string name)
 nilsetListenerRayDirectionZ (string name)
 nilsetListenerRayDistance (string name)
 nilsetListenerRayName (string name)
 nilsetListenerRepresentation (string name)
 nilsetListenerSize (string name)
 nilsetSelectedIndexesFromListBox (string name, representationID ID)
 nilsetSelectedIndexesFromTree (string name, representationID ID)
 nilsetSelectedIndexFromListBox (string name, representationID ID)
 nilsetSelectedIndexFromTree (string name, representationID ID)
 nilsetSelectedItemFromComboBox (string name, representationID ID)
 nilsetSelectedItemFromListBox (string name, representationID ID)
 nilsetSelectedItemFromTree (string name, representationID ID)
 nilsetSelectedItemsFromListBox (string name, representationID ID)
 nilsetSelectedItemsFromTree (string name, representationID ID)
 nilsetSelectedNameFromComboBox (string name, representationID ID)
 nilsetSelectedNameFromListBox (string name, representationID ID)
 nilsetSelectedNameFromTree (string name, representationID ID)
 nilsetSelectedNamesFromListBox (string name, representationID ID)
 nilsetSelectedNamesFromTree (string name, representationID ID)
 nilsetSelectedTabFromTabPane (string name, representationID ID)
 nilsetSelectedTextFromCodeBox (string name, representationID ID)
 nilsetSelectedTextFromComboBox (string name, representationID ID)
 nilsetSelectedTextFromEditBox (string name, representationID ID)
 nilsetSelectedTextFromMultilineEditBox (string name, representationID ID)
 nilsetTextFromCodeBox (string name, representationID ID)
 nilsetTextFromComboBox (string name, representationID ID)
 nilsetTextFromEditBox (string name, representationID ID)
 nilsetTextFromMultilineEditBox (string name, representationID ID)
 nilsetValue (string name, number dataType, string value)
 nilsetValueFromCheckBox (string name, representationID ID)
 nilsetValueFromProgressBar (string name, representationID ID)
 nilsetValueFromRadioButton (string name, representationID ID)
 nilsetValueFromScrollBar (string name, representationID ID)
 nilsetValueFromSliderBar (string name, representationID ID)
 nilsetValueFromSpinner (string name, representationID ID)
 nilsetValueFromToggleButton (string name, representationID ID)

Function Summary
 InterModelnewIM ()

Method Detail

clearArguments

nil clearArguments ()
Clears all the parameters of this interaction model.


getArguments

array{} getArguments ()
Returns the parameters in this interaction model.

Returns:
array{} - The first string is the name of the parameter, the number is the type of the data and the second string is the value of the parameter.


print

nil print ()
Prints the Interaction Model object.


setListenerAbsolutePosition

nil setListenerAbsolutePosition (string name)
Adds to the Interaction Model a parameter with the absolute position position of the event. It is valid for listeners such as mouse events and ray hits. The parameter will receive a table of numbers.

Parameters:
string name - Name of the attribute to set.


setListenerAbsolutePositionX

nil setListenerAbsolutePositionX (string name)
Adds to the Interaction Model a parameter with the X coordinate of the absolute position position of the event. It is valid for listeners such as mouse events and ray hits. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerAbsolutePositionY

nil setListenerAbsolutePositionY (string name)
Adds to the Interaction Model a parameter with the Y coordinate of the absolute position position of the event. It is valid for listeners such as mouse events and ray hits. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerAbsolutePositionZ

nil setListenerAbsolutePositionZ (string name)
Adds to the Interaction Model a parameter with the Z coordinate of the absolute position position of the event. It is valid for listeners such as mouse events and ray hits. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerAbsoluteRaySourcePosition

nil setListenerAbsoluteRaySourcePosition (string name)
Adds to the Interaction Model a parameter with the absolute ray source position. The parameter will receive an array of numbers [x,y,z].

Parameters:
string name - Name of the attribute to set.


setListenerAbsoluteRaySourcePositionX

nil setListenerAbsoluteRaySourcePositionX (string name)
Adds to the Interaction Model a parameter with the X coordinate of the absolute ray source position. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerAbsoluteRaySourcePositionY

nil setListenerAbsoluteRaySourcePositionY (string name)
Adds to the Interaction Model a parameter with the Y coordinate of the absolute ray source position. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerAbsoluteRaySourcePositionZ

nil setListenerAbsoluteRaySourcePositionZ (string name)
Adds to the Interaction Model a parameter with the Z coordinate of the absolute ray source position. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerDeltaMove

nil setListenerDeltaMove (string name)
Adds to the Interaction Model a parameter with the movement of the event. It is valid for listeners of mouse movement events over overlays (2d) or 3d objects. The parameter will receive a table of numbers.

Parameters:
string name - Name of the attribute to set.


setListenerDeltaMoveX

nil setListenerDeltaMoveX (string name)
Adds to the Interaction Model a parameter with the X axis movement of the event. It is valid for listeners of mouse movement events over overlays (2d) or 3d objects. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerDeltaMoveY

nil setListenerDeltaMoveY (string name)
Adds to the Interaction Model a parameter with the Y axis movement of the event. It is valid for listeners of mouse movement events over overlays (2d) or 3d objects. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerDeltaMoveZ

nil setListenerDeltaMoveZ (string name)
Adds to the Interaction Model a parameter with the Z axis movement of the event. It is valid for listeners of mouse movement events over 3d objects. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerMousePosition

nil setListenerMousePosition (string name)
Adds to the Interaction Model a parameter with the mouse position on screen. The parameter will receive an array of numbers [x,y].

Parameters:
string name - Name of the attribute to set.


setListenerMousePositionX

nil setListenerMousePositionX (string name)
Adds to the Interaction Model a parameter with the X coordinate of the mouse position on screen. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerMousePositionY

nil setListenerMousePositionY (string name)
Adds to the Interaction Model a parameter with the Y coordinate of the mouse position on screen. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerPosition

nil setListenerPosition (string name)
Adds to the Interaction Model a parameter with the relative position of the event. It is valid for listeners such as overlay movements, mouse events, ray hits and colisions. The parameter will receive a table of numbers.

Parameters:
string name - Name of the attribute to set.


setListenerPositionX

nil setListenerPositionX (string name)
Adds to the Interaction Model a parameter with the X coordinate of the relative position of the event. It is valid for listeners such as overlay movements, mouse events, ray hits and colisions. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerPositionY

nil setListenerPositionY (string name)
Adds to the Interaction Model a parameter with the Y coordinate of the relative position of the event. It is valid for listeners such as overlay movements, mouse events, ray hits and colisions. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerPositionZ

nil setListenerPositionZ (string name)
Adds to the Interaction Model a parameter with the Z coordinate of the relative position of the event. It is valid for listeners such as mouse events, ray hits and colisions. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerRayDirection

nil setListenerRayDirection (string name)
Adds to the Interaction Model a parameter with the ray direction. The parameter will receive an array of numbers [dx,dy,dz].

Parameters:
string name - Name of the attribute to set.


setListenerRayDirectionX

nil setListenerRayDirectionX (string name)
Adds to the Interaction Model a parameter with the X coordinate of the ray direction. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerRayDirectionY

nil setListenerRayDirectionY (string name)
Adds to the Interaction Model a parameter with the Y coordinate of the ray direction. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerRayDirectionZ

nil setListenerRayDirectionZ (string name)
Adds to the Interaction Model a parameter with the Z coordinate of the ray direction. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerRayDistance

nil setListenerRayDistance (string name)
Adds to the Interaction Model a parameter with the distance to the source of the ray cast. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.


setListenerRayName

nil setListenerRayName (string name)
Adds to the Interaction Model a parameter with the ray name. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.


setListenerRepresentation

nil setListenerRepresentation (string name)
Adds to the Interaction Model a parameter with the ID of the representation that throws the event. The parameter will receive a representation ID.

Parameters:
string name - Name of the attribute to set.


setListenerSize

nil setListenerSize (string name)
Adds to the Interaction Model a parameter with the new size after a resizing event. It is valid for listeners of overlay resizing events. The parameter will receive a table of numbers.

Parameters:
string name - Name of the attribute to set.


setSelectedIndexesFromListBox

nil setSelectedIndexesFromListBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the indexes of the selected items of a list box. The parameter will receive a table of numbers.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the list box.


setSelectedIndexesFromTree

nil setSelectedIndexesFromTree (string name, representationID ID)
Adds to the Interaction Model a parameter with the indexes of the selected items of a tree. The parameter will receive a table of numbers.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the tree.


setSelectedIndexFromListBox

nil setSelectedIndexFromListBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the index of the selected item of a list box. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the list box.


setSelectedIndexFromTree

nil setSelectedIndexFromTree (string name, representationID ID)
Adds to the Interaction Model a parameter with the index of the selected item of a tree. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the tree.


setSelectedItemFromComboBox

nil setSelectedItemFromComboBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the selected item of a combobox. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the combobox.


setSelectedItemFromListBox

nil setSelectedItemFromListBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the ID of the selected item of a list box. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the list box.


setSelectedItemFromTree

nil setSelectedItemFromTree (string name, representationID ID)
Adds to the Interaction Model a parameter with the ID of the selected item of a tree. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the tree.


setSelectedItemsFromListBox

nil setSelectedItemsFromListBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the IDs of the selected items of a list box. The parameter will receive a table of strings.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the list box.


setSelectedItemsFromTree

nil setSelectedItemsFromTree (string name, representationID ID)
Adds to the Interaction Model a parameter with the IDs of the selected items of a tree. The parameter will receive a table of strings.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the tree.


setSelectedNameFromComboBox

nil setSelectedNameFromComboBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the selected name of a combobox. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the combobox.


setSelectedNameFromListBox

nil setSelectedNameFromListBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the text of the selected item of a list box. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the list box.


setSelectedNameFromTree

nil setSelectedNameFromTree (string name, representationID ID)
Adds to the Interaction Model a parameter with the text of the selected item of a tree. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the tree.


setSelectedNamesFromListBox

nil setSelectedNamesFromListBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the text of the selected items of a list box. The parameter will receive a table of strings.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the list box.


setSelectedNamesFromTree

nil setSelectedNamesFromTree (string name, representationID ID)
Adds to the Interaction Model a parameter with the text of the selected items of a tree. The parameter will receive a table of strings.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the tree.


setSelectedTabFromTabPane

nil setSelectedTabFromTabPane (string name, representationID ID)
Adds to the Interaction Model a parameter with the number of the selected tab.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the tab pan.


setSelectedTextFromCodeBox

nil setSelectedTextFromCodeBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the selected text from a code box. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the code box.


setSelectedTextFromComboBox

nil setSelectedTextFromComboBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the selected text of a combobox. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the combobox.


setSelectedTextFromEditBox

nil setSelectedTextFromEditBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the selected text of an edit box. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the edit box.


setSelectedTextFromMultilineEditBox

nil setSelectedTextFromMultilineEditBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the selected text of a multiline edit box. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the multiline edit box.


setTextFromCodeBox

nil setTextFromCodeBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the text from a code box. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the code box.


setTextFromComboBox

nil setTextFromComboBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the text of a combobox. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the combobox.


setTextFromEditBox

nil setTextFromEditBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the text from an edit box. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the edit box.


setTextFromMultilineEditBox

nil setTextFromMultilineEditBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the text from an multiline edit box. The parameter will receive a string.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the multiline edit box.


setValue

nil setValue (string name, number dataType, string value)
Adds a parameter to the interaction model with a determined.
Available data types:
1 - number
2 - boolean
3 - string
4 - object
5 - mediaitem
6 - representation
7 - material
8 - matrix
9 - camera
10 - interactionmodel
11 - array
12 - array{number}
13 - array{boolean}
14 - array{string}
15 - array{object}
16 - array{mediaitem}
17 - array{representation}
18 - array{material}
19 - array{matrix}
20 - array{camera}

Parameters:
string name - Name of the parameter.
number dataType - Data type of the parameter.
string value - Value of the parameter.


setValueFromCheckBox

nil setValueFromCheckBox (string name, representationID ID)
Adds to the Interaction Model a parameter with the value of a checkbox (selected or unselected). The parameter will receive a boolean.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the checkbox.


setValueFromProgressBar

nil setValueFromProgressBar (string name, representationID ID)
Adds to the Interaction Model a parameter with the value of a progress bar. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the progress bar.


setValueFromRadioButton

nil setValueFromRadioButton (string name, representationID ID)
Adds to the Interaction Model a parameter with the value of a radio button (selected or unselected). The parameter will receive a boolean.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the radio button.


setValueFromScrollBar

nil setValueFromScrollBar (string name, representationID ID)
Adds to the Interaction Model a parameter with the value of a scroll bar. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the scroll bar.


setValueFromSliderBar

nil setValueFromSliderBar (string name, representationID ID)
Adds to the Interaction Model a parameter with the value of a slider bar. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the slider bar.


setValueFromSpinner

nil setValueFromSpinner (string name, representationID ID)
Adds to the Interaction Model a parameter with the value of a spinner. The parameter will receive a number.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the spinner.


setValueFromToggleButton

nil setValueFromToggleButton (string name, representationID ID)
Adds to the Interaction Model a parameter with the value of a toggle button (checked or unchecked). The parameter will receive a boolean.

Parameters:
string name - Name of the attribute to set.
representationID ID - of the toggle button.


Function Detail

newIM

InterModel newIM ()
Creates a new Interaction Model object.

Returns:
InterModel - The new InterModel.