loading...
Join the ludiloom Public Alpha Test and help us change the game-making game...
Ludiloom API
last updated on 2009, May 22nd
| Base Concepts | Scene Objects | Data Interface | Gui Overlays | |||
|
Arena Object ObjectTemplate Presence PresenceTemplate RuleBook System |
BillBoard Camera Effect HighlightDecal Light Material MeshDecal |
Model Plane River Road Sound StaticFlora Terrain |
HashTable InterModel Matrix MediaItem Vector |
Button Checkbox CodeEditbox ComboBox Editbox Listbox MenuBar MenuItem |
MenuPopup MultiColumn MultilineEditbox ProgressBar RadioButton ScrollBar ScrollPane SliderBar |
Spinner StaticImage StaticText TabPane ToggleButton Tree Window |
InterModel
print
nil print ()
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 | |
nil | clearArguments () |
array{} | getArguments () |
nil | print () |
nil | setListenerAbsolutePosition (string name) |
nil | setListenerAbsolutePositionX (string name) |
nil | setListenerAbsolutePositionY (string name) |
nil | setListenerAbsolutePositionZ (string name) |
nil | setListenerAbsoluteRaySourcePosition (string name) |
nil | setListenerAbsoluteRaySourcePositionX (string name) |
nil | setListenerAbsoluteRaySourcePositionY (string name) |
nil | setListenerAbsoluteRaySourcePositionZ (string name) |
nil | setListenerDeltaMove (string name) |
nil | setListenerDeltaMoveX (string name) |
nil | setListenerDeltaMoveY (string name) |
nil | setListenerDeltaMoveZ (string name) |
nil | setListenerMousePosition (string name) |
nil | setListenerMousePositionX (string name) |
nil | setListenerMousePositionY (string name) |
nil | setListenerPosition (string name) |
nil | setListenerPositionX (string name) |
nil | setListenerPositionY (string name) |
nil | setListenerPositionZ (string name) |
nil | setListenerRayDirection (string name) |
nil | setListenerRayDirectionX (string name) |
nil | setListenerRayDirectionY (string name) |
nil | setListenerRayDirectionZ (string name) |
nil | setListenerRayDistance (string name) |
nil | setListenerRayName (string name) |
nil | setListenerRepresentation (string name) |
nil | setListenerSize (string name) |
nil | setSelectedIndexesFromListBox (string name, representationID ID) |
nil | setSelectedIndexesFromTree (string name, representationID ID) |
nil | setSelectedIndexFromListBox (string name, representationID ID) |
nil | setSelectedIndexFromTree (string name, representationID ID) |
nil | setSelectedItemFromComboBox (string name, representationID ID) |
nil | setSelectedItemFromListBox (string name, representationID ID) |
nil | setSelectedItemFromTree (string name, representationID ID) |
nil | setSelectedItemsFromListBox (string name, representationID ID) |
nil | setSelectedItemsFromTree (string name, representationID ID) |
nil | setSelectedNameFromComboBox (string name, representationID ID) |
nil | setSelectedNameFromListBox (string name, representationID ID) |
nil | setSelectedNameFromTree (string name, representationID ID) |
nil | setSelectedNamesFromListBox (string name, representationID ID) |
nil | setSelectedNamesFromTree (string name, representationID ID) |
nil | setSelectedTabFromTabPane (string name, representationID ID) |
nil | setSelectedTextFromCodeBox (string name, representationID ID) |
nil | setSelectedTextFromComboBox (string name, representationID ID) |
nil | setSelectedTextFromEditBox (string name, representationID ID) |
nil | setSelectedTextFromMultilineEditBox (string name, representationID ID) |
nil | setTextFromCodeBox (string name, representationID ID) |
nil | setTextFromComboBox (string name, representationID ID) |
nil | setTextFromEditBox (string name, representationID ID) |
nil | setTextFromMultilineEditBox (string name, representationID ID) |
nil | setValue (string name, number dataType, string value) |
nil | setValueFromCheckBox (string name, representationID ID) |
nil | setValueFromProgressBar (string name, representationID ID) |
nil | setValueFromRadioButton (string name, representationID ID) |
nil | setValueFromScrollBar (string name, representationID ID) |
nil | setValueFromSliderBar (string name, representationID ID) |
nil | setValueFromSpinner (string name, representationID ID) |
nil | setValueFromToggleButton (string name, representationID ID) |
| Function Summary | |
InterModel | newIM () |
| 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.
- 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.

