![]() |
The Agent Tool
1.01
An Agent Based Graphic Sound Synthesis Environment
|
Go to the source code of this file.
Functions | |
void | initai () |
This MUST be called at the start of each Agent script. This initializes the parent script so that it is interpreted as an Agent by the system. | |
float | getDT () |
A utility and timing function that provides the delta between the current frame and the previous (i.e time elapsed). Delta between now and previous frame. | |
int | getID () |
A crucial function allowing an Agent to obtain its own ID. Provides the unique identifier for the currently active Agent. | |
bool | hasChildren () |
Returns whether the current Agent has any children. Returns whether the current Agent has any children. | |
bool | hasChildrenID (int ID) |
Indicates whether an Agent, specified by an ID has any children. Indicates whether an Agent, specified by an ID has any children. | |
int | numberOfChildren () |
Returns the number of children of the currently active Agent Returns the number of children of the currently active Agent. | |
int | numberOfChildrenID (int ID) |
Provides access to the number of children of a specified Agent. Provides access to the number of children of a specified Agent. | |
int | getChild (int childIndex) |
Allows you to obtain the unique ID of a child Agent. Allows you to obtain the unique ID of a child Agent through a relative index. For example, you can obtain the second child through getChild(1) | |
int | getChildID (int childID, int parentID) |
Allows you to obtain the child of another Agent. Allows you to obtain a child from any Agent if its ID is known. | |
int | getParent () |
Allows an Agent to obtain the ID of its parent. Allows an Agent to obtain the ID of its parent. | |
int | getParentID (int childID) |
Allows an Agent to obtain the ID of a parent of another if its ID is known. Allows an Agent to obtain the ID of a parent of another if its ID is known. | |
void | die () |
Kills the currently active Agent. Kills the currently active Agent. | |
void | killID (int agentID) |
Allows an Agent to kill another Agent if its ID is known. Allows an Agent to kill another Agent if its ID is known. | |
int | spawn (int parentID, int nodeType, string agentFunctionName, int xPos, int yPos) |
Allows the spawning of an Agent (or another Node type) in world coordinates. he basic spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at. | |
int | spawn (int parentID, int nodeType, string agentFunctionName, Vec2 position) |
Allows the spawning of an Agent (or another Node type) in world coordinates. he basic spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at. | |
int | spawnRelative (int parentID, int nodeType, string agentFunctionName, int xPos, int yPos) |
Allows the spawning of an Agent (or another Node type) using coordinates relative to the currently active Agent. A spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via coordinates that are relative to the currently active Agent's position (as cartesian components or as a Vec2). | |
int | spawnRelative (int parentID, int nodeType, string agentFunctionName, Vec2 position) |
Allows the spawning of an Agent (or another Node type) using coordinates relative to the currently active Agent. A spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via coordinates that are relative to the currently active Agent's position (as cartesian components or as a Vec2). | |
int | spawnP (table propertyTable, int parentID, int nodeType, string agentFunctionName, int xPos, int yPos) |
Allows the spawning of an Agent (or another Node type) with a table of properties for it to use. A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at. | |
int | spawnP (table propertyTable, int parentID, int nodeType, string agentFunctionName, Vec2 position) |
Allows the spawning of an Agent (or another Node type) with a table of properties for it to use. A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at. | |
int | spawnRelativeP (table propertyTable, int parentID, int nodeType, string agentFunctionName, int xPos, int yPos) |
Allows the spawning of an Agent (or another Node type) with a table of properties for it to use with coordinates relative to the currently active Agent A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing relative coordinates (as cartesian components or as a Vec2) for the Agent to spawn at. | |
int | spawnRelativeP (table propertyTable, int parentID, int nodeType, string agentFunctionName, Vec2 position) |
Allows the spawning of an Agent (or another Node type) with a table of properties for it to use with coordinates relative to the currently active Agent A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing relative coordinates (as cartesian components or as a Vec2) for the Agent to spawn at. | |
float | getLifetime () |
Allows an Agent to obtain how long it has been alive in seconds. Allows an Agent to obtain how long it has been alive in seconds. | |
float | getLifetimeID (int ID) |
Allows an Agent to obtain how long another Agent has been alive in seconds. Allows an Agent to obtain how long another Agent has been alive in seconds. | |
Vec2 | getPosition () |
Allows an Agent to quickly obtain its position. Allows an Agent to quickly obtain its position. | |
Vec2 | getPositionID (int ID) |
Allows Agents to quickly obtain the position of any given Agent. Allows Agents to quickly obtain the position of any given Agent. | |
void | setPosition (int xPos, int yPos) |
Allows an Agent to set its position. (Deprecated) Allows an Agent to set its position. This is deprecated, uses should use setP, specifying the position property. i.e setP("pos" Vec2.new(100,100)) | |
void | setPositionID (int xPos, int yPos, int ID) |
Allows an Agent to set the position of another Agent. Allows an Agent to set the position of another Agent. This is deprecated, uses should use setP, specifying the position property. i.e setPID("pos",Vec2.new(200,200),ID). | |
void | move (int x, int y) |
Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount. | |
void | move (Vec2 delta) |
Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount. | |
void | moveID (int x, int y, int ID) |
Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount. | |
void | moveID (Vec2 delta, int ID) |
Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount. | |
void | initP (table propertyTable) |
Initializes the Agent with a suite of provided properties. Allows a function to be intialized as an Agent with a set of properties that are provided in a table of key value pairs {key=value}. | |
void | initPID (table propertyTable, int ID) |
Allows an Agent to initialize another Agent with a suite of properties. Allows an Agent to initialize another Agent with a suite of properties that are stored in a table of key value pairs {key=value}. | |
void | addP (string propertyID, bool value) |
Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2. | |
void | addP (string propertyID, int value) |
Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2. | |
void | addP (string propertyID, float value) |
Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2. | |
void | addP (string propertyID, string value) |
Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2. | |
void | addP (string propertyID, Vec2 value) |
Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2. | |
void | addP (table propertyTable) |
Allows an Agent to add table of new properties. Allows an Agent to add table of new properties in key value pairs {key=value}. The property can be of the following types: bool, float, int, string, Vec2. | |
void | addPID (string propertyID, bool value, int ID) |
Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2. | |
void | addPID (string propertyID, int value, int ID) |
Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2. | |
void | addPID (string propertyID, float value, int ID) |
Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2. | |
void | addPID (string propertyID, string value, int ID) |
Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2. | |
void | addPID (string propertyID, Vec2 value, int ID) |
Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2. | |
void | addPID (table propertyTable, int ID) |
Allows an Agent to add table of new properties to another Agent. Allows an Agent to add table of new properties in key value pairs {key=value} to another Agent. The property can be of the following types: bool, float, int, string, Vec2. | |
void | setP (string propertyID, bool value) |
Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued. | |
void | setP (string propertyID, int value) |
Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued. | |
void | setP (string propertyID, float value) |
Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued. | |
void | setP (string propertyID, string value) |
Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued. | |
void | setP (string propertyID, Vec2 value) |
Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued. | |
void | setPID (string propertyID, bool value, int ID) |
Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued. | |
void | setPID (string propertyID, int value, int ID) |
Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued. | |
void | setPID (string propertyID, float value, int ID) |
Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued. | |
void | setPID (string propertyID, string value, int ID) |
Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued. | |
void | setPID (string propertyID, Vec2 value, int ID) |
Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued. | |
void | setP (table propertyTable) |
Allows an Agent to set a table of properties. Allows an Agent to set a table of new properties. This table must contain key value pairs of data. If property in this table does not exist, a new property will be created for the data. If the current Agent is controlling a SuperCollider node, the system will attempt to set the arguments of the same names to the proposed values. | |
void | setPID (table propertyTable, int ID) |
Allows an Agent to set a table of properties in a specified Agent. Allows an Agent to set a table of new properties in a specified Agent. This table must contain key value pairs of data. If property in this table does not exist, a new property will be created for the data. If the current Agent is controlling a SuperCollider node, the system will attempt to set arguments of the same name to the proposed values. | |
bool | getP (string propertyName) |
Allows an Agent to obtain the value of a property. Allows an Agent to obtain the value of a property, which can be a bool, int, float, string or Vec2. | |
bool | getPID (string propertyName, int ID) |
Allows an Agent to obtain the value of a property which belongs to another Agent. Allows an Agent to obtain the value of a property, belonging to another Agent. This value can be a bool, int, float, string or Vec2. | |
void | changeMotionModel (string modelType) |
Allows an Agent to switch between types of motion. Allows an Agent to alternate between "Linear", "Physics","Static" and "Path" motion models. | |
void | changeMotionModelID (string modelType, int ID) |
Allows a specified Agent to switch between types of motion Allows a specified Agent to alternate between "Linear", "Physics","Static" and "Path" motion models. | |
void | scNew (string synthName, int nodeID) |
Allows an Agent to spawn a Supercollider synth of the provided typename with the provided index. Allows an Agent to spawn a Supercollider synth of the provided typename with the provided index. | |
void | scSet (string argName, float value, int nodeID) |
Allows an Agent to set the argument of a SuperCollider node. Allows an Agent to set the argument of a SuperCollider node. | |
void | scFree (int nodeID) |
Kills the SuperCollider node with the ID provided. Kills the SuperCollider node with the ID provided. | |
int | getNearest (Vec2 point) |
Allows an Agent to obtain the ID of another Agent, closest to the provided position. Allows an Agent to obtain the ID of another Agent, closest to the provided position. | |
int | getNearest () |
Allows an Agent to obtain the ID of another Agent, closest to the provided position. Allows an Agent to obtain the ID of the closest other Agent. | |
int | getNearestID (int ID) |
Allows you to obtain the closest Agent to a specified Agent. Allows you to obtain the closest Agent to a specified Agent. | |
void | drawRelativeID (int screenIndex, Vec2 relativePos, int r, int g, int b, int ID) |
Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the Agent whose ID is provided. | |
void | drawRelativeID (int screenIndex, Vec2 relativePos, RGBA colourData, int ID) |
Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the Agent whose ID is provided. | |
void | drawRelative (int screenIndex, Vec2 relativePos, int r, int g, int b, int ID) |
Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the currently active Agent. | |
void | drawRelative (int screenIndex, Vec2 relativePos, RGBA colourData, int ID) |
Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the currently active Agent. | |
int | getRedFromPoint (int screenIndex, Vec2 point) |
Allows an Agent to extract the red component of a point on a given screen canvas. Allows an Agent to extract the red component of a point on a given screen canvas. | |
int | getGreenFromPoint (int screenIndex, Vec2 point) |
Allows an Agent to extract the green component of a point on a given screen canvas. Allows an Agent to extract the green component of a point on a given screen canvas. | |
int | getBlueFromPoint (int screenIndex, Vec2 point) |
Allows an Agent to extract the blue component of a point on a given screen canvas. Allows an Agent to extract the blue component of a point on a given screen canvas. | |
int | getTotalFromPoint (int screenIndex, Vec2 point) |
Allows the extraction of the total/sum of all three colour components at a given point. Allows the extraction of the total/sum of all three colour components at a given point. | |
float | getMeanFromPoint (int screenIndex, Vec2 point) |
Allows the extraction of the mean/average of all three colour components at a given point. Allows the extraction of the mean/average of all three colour components at a given point. | |
int | getR (int screenIndex) |
Returns the red component at an Agents current position. Returns the red component at an Agents current position. | |
int | getRID (int screenIndex, int ID) |
Returns the red component at a specified Agents position. Returns the red component at a specified Agents position. | |
int | getG (int screenIndex) |
Returns the green component at an Agents current position. Returns the green component at an Agents current position. | |
int | getGID (int canvasIndex, int agentID) |
Returns the green component at a specified Agents position. Returns the green component at a specified Agents position. | |
int | getB (int canvasIndex) |
Returns the blue component at an Agents current position. Returns the blue component at an Agents current position. | |
int | getBID (int canvasIndex, int agentID) |
Returns the blue component at a specified Agents position. Returns the blue component at a specified Agents position. | |
int | getTotalCol (int screenIndex) |
Allows the extraction of the total/sum of all three colour components at the Agents position. Allows the extraction of the total/sum of all three colour components at the Agents position. | |
int | getTotalID (int screenIndex, int agentID) |
Allows the extraction of the total/sum of all three colour components at a specified Agents position. Allows the extraction of the total/sum of all three colour components at a specified Agents position. | |
int | getMeanColID (int agentID) |
Allows the extraction of the mean/average of all three colour components at the position of a specified Agent. Allows the extraction of the mean/average of all three colour components at the position of a specified Agent. | |
int | getMeanCol () |
Allows the extraction of the mean/average of all three colour components at the position of the current Agent. Allows the extraction of the mean/average of all three colour components at the position of the current Agent. | |
RGBA | getRGBA (int screenIndex) |
Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at it's position. Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at it's position. | |
RGBA | getRGBA (Vec2 position, int screenIndex) |
Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at a position. Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at a position. | |
RGBA | getRGBAID (int screenIndex, int agentID) |
Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at the position of another Agent. Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at the position of another Agent. | |
table | getNearby (int radius) |
Allows an Agent to obtain the ID's of all of the Agents within a surrounding radius. Allows an Agent to obtain the ID's of all of the Agents within a surrounding radius. | |
table | getNearby (int radius, Vec2 position) |
Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified point. Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified point. | |
table | getNearbyID (int radius, int agentID) |
Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified Agent. Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified Agent. | |
Vec2 | getWorldSize () |
Allows an Agent to obtain the size of the current world. Allows an Agent to obtain the size of the current world. | |
void | oscSF (string ipAddress, string portNumber, string path, string stringData, float number) |
Allows the sending of a string and a float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a string and a float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) | |
void | oscF (string ipAddress, string portNumber, string path, float number) |
Allows the sending of float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) | |
void | oscSI (string ipAddress, string portNumber, string path, string stringData, int number) |
Allows the sending of a string and an integer via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a string and an integer via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) | |
void | oscI (string ipAddress, string portNumber, string path, int number) |
Allows the sending of float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of an integer via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) | |
void | oscSS (string ipAddress, string portNumber, string path, string stringData, string secondStringData) |
Allows the sending of two string via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a pair of strings via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) | |
void | oscS (string ipAddress, string portNumber, string stringData) |
Allows the sending of a string via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a string via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) | |
void | killChildren () |
Kills all of the current Agent's children. Kills all of the current Agent's children. | |
void | killChildrenID (int agentID) |
Kills all of the specified Agents children. Kills all of the specified Agents children. | |
void | addPathPoint (int pathIndex, int xPos, int yPos) |
Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one. Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one. | |
void | addPathPoint (int pathIndex, int Vec2) |
Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one. Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one. | |
void | removePathPoint (int pathIndex, int pointIndex) |
Allows an Agent to remove a point in a path. Allows an Agent to remove a point in a path. | |
void | movePathPoint (int pathIndex, int pointIndex, int xPos, int yPos) |
Allows an Agent to move a point in a path. Allows an Agent to move a point in a path. | |
void | movePathPoint (int pathIndex, int pointIndex, Vec2 position) |
Allows an Agent to move a point in a path. Allows an Agent to move a point in a path. | |
int | addPath (int xPos, int yPos) |
Allows an Agent to create a new path. A single point must be provided. Allows an Agent to create a new path. A single point must be provided. | |
int | addPath (Vec2 position) |
Allows an Agent to create a new path. A single point must be provided. Allows an Agent to create a new path. A single point must be provided. | |
void | removePath (int pathIndex) |
Allows an Agent to remove/delete a path with a given index. Allows an Agent to remove/delete a path with a given index. | |
void | movePath (int pathIndex, int xDelta, int yDelta) |
Allows an Agent to move a path by a delta. Allows an Agent to move a path by a delta. | |
void | movePath (int pathIndex, Vec2 delta) |
Allows an Agent to move a path by a delta. Allows an Agent to move a path by a delta. | |
bool | hasP (string propertyName) |
Allows an Agent to check whether it has a property with a specified name. Allows an Agent to check whether it has a property with a specified name. | |
bool | hasPID (string propertyName) |
Allows an Agent to check whether another Agent contains a property with a specified name. Allows an Agent to check whether another Agent contains a property with a specified name. | |
string | getType () |
Allows an Agent to obtain its own type. Allows an Agent to obtain its own type. | |
string | getTypeID () |
Allows an Agent to obtain the type of another Agent. Allows an Agent to obtain the type of another Agent. | |
void | send (string ipAddress, string portNumber, string path,...data) |
Allows an Agent to send OSC data to a specified IPAddress, port and path. Allows an Agent to send OSC data to a specified IPAddress, port and path. A user can append as many pieces of data to send as they wish. This data can be numbers, strings and tables containing key value pairs of data. e.g send("127.0.0.1","8000","/example",100,"hello",3.14159,{more=info,data=200} ) | |
int | currentScreen () |
Allows an Agent to obtain the index of the currently visible screen. Allows an Agent to obtain the index of the currently visible screen. | |
void | drawLine (int screenIndex, Vec2 startPosition, Vec2 endPosition, int red, int green, int blue) |
Allows an Agent to draw a line between two points on a specified screen. Allows an Agent to draw a line between two points on a specified screen. | |
void | drawLine (int screenIndex, Vec2 startPosition, Vec2 endPosition, RGBA colourData) |
Allows an Agent to draw a line between two points on a specified screen. Allows an Agent to draw a line between two points on a specified screen. | |
void | drawRect (int screenIndex, Vec2 bottomLeft, Vec2 topRight, int red, int green, int blue, int thickness) |
Allows an Agent to draw a rectangle on a specified screen. Allows an Agent to draw a rectangle on a specified screen. | |
void | drawRect (int screenIndex, Vec2 bottomLeft, Vec2 topRight, RGBA colourData, int thickness) |
Allows an Agent to draw a rectangle on a specified screen. Allows an Agent to draw a rectangle on a specified screen. | |
void | drawCircle (int screenIndex, Vec2 centrePosition, int radius, int red, int green, int blue, int thickness) |
Allows an Agent to draw a circle on a specified screen. Allows an Agent to draw a circle on a specified screen. | |
void | drawCircle (int screenIndex, Vec2 centrePosition, int radius, RGBA colourData, int thickness) |
Allows an Agent to draw a circle on a specified screen. Allows an Agent to draw a circle on a specified screen. |
void addP | ( | string | propertyID, |
bool | value | ||
) |
Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.
propertyID | The name of the new property |
value | The initial value of the property |
void addP | ( | string | propertyID, |
int | value | ||
) |
Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.
propertyID | The name of the new property |
value | The initial value of the property |
void addP | ( | string | propertyID, |
float | value | ||
) |
Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.
propertyID | The name of the new property |
value | The initial value of the property |
void addP | ( | string | propertyID, |
string | value | ||
) |
Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.
propertyID | The name of the new property |
value | The initial value of the property |
void addP | ( | string | propertyID, |
Vec2 | value | ||
) |
Allows an Agent to add a new property. Allows an Agent to add a new property. The property can be of the following types: bool, float, int, string, Vec2.
propertyID | The name of the new property |
value | The initial value of the property |
void addP | ( | table | propertyTable | ) |
Allows an Agent to add table of new properties. Allows an Agent to add table of new properties in key value pairs {key=value}. The property can be of the following types: bool, float, int, string, Vec2.
propertyTable | A table of property key value pairs |
int addPath | ( | int | xPos, |
int | yPos | ||
) |
Allows an Agent to create a new path. A single point must be provided. Allows an Agent to create a new path. A single point must be provided.
xPos | Cartesian X coordinate |
yPos | Cartesian Y coordinate |
int addPath | ( | Vec2 | position | ) |
Allows an Agent to create a new path. A single point must be provided. Allows an Agent to create a new path. A single point must be provided.
position | First point of the new path |
void addPathPoint | ( | int | pathIndex, |
int | xPos, | ||
int | yPos | ||
) |
Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one. Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one.
pathIndex | Index of the path to use |
xPos | Cartesian X coordinate |
yPos | Cartesian Y coordinate |
void addPathPoint | ( | int | pathIndex, |
int | Vec2 | ||
) |
Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one. Allows an Agent to add a point to a path. If a path with the specified index does not exist it will create a new one.
pathIndex | Index of the path to use |
Vec2 | Point to add |
void addPID | ( | string | propertyID, |
bool | value, | ||
int | ID | ||
) |
Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.
propertyID | The name of the new property |
value | The initial value of the property |
ID | ID for the specified Agent |
void addPID | ( | string | propertyID, |
int | value, | ||
int | ID | ||
) |
Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.
propertyID | The name of the new property |
value | The initial value of the property |
ID | ID for the specified Agent |
void addPID | ( | string | propertyID, |
float | value, | ||
int | ID | ||
) |
Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.
propertyID | The name of the new property |
value | The initial value of the property |
ID | ID for the specified Agent |
void addPID | ( | string | propertyID, |
string | value, | ||
int | ID | ||
) |
Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.
propertyID | The name of the new property |
value | The initial value of the property |
ID | ID for the specified Agent |
void addPID | ( | string | propertyID, |
Vec2 | value, | ||
int | ID | ||
) |
Allows an Agent to add a new property to another Agent. Allows an Agent to add a new property to another Agent. The property can be of the following types: bool, float, int, string, Vec2.
propertyID | The name of the new property |
value | The initial value of the property |
ID | ID for the specified Agent |
void addPID | ( | table | propertyTable, |
int | ID | ||
) |
Allows an Agent to add table of new properties to another Agent. Allows an Agent to add table of new properties in key value pairs {key=value} to another Agent. The property can be of the following types: bool, float, int, string, Vec2.
propertyTable | A table of property key value pairs |
ID | ID for the specified Agent |
void changeMotionModel | ( | string | modelType | ) |
Allows an Agent to switch between types of motion. Allows an Agent to alternate between "Linear", "Physics","Static" and "Path" motion models.
modelType | String representing the type of motion model |
void changeMotionModelID | ( | string | modelType, |
int | ID | ||
) |
Allows a specified Agent to switch between types of motion Allows a specified Agent to alternate between "Linear", "Physics","Static" and "Path" motion models.
modelType | String representing the type of motion model |
ID | ID for the specified Agent |
int currentScreen | ( | ) |
Allows an Agent to obtain the index of the currently visible screen. Allows an Agent to obtain the index of the currently visible screen.
void die | ( | ) |
Kills the currently active Agent. Kills the currently active Agent.
void drawCircle | ( | int | screenIndex, |
Vec2 | centrePosition, | ||
int | radius, | ||
int | red, | ||
int | green, | ||
int | blue, | ||
int | thickness | ||
) |
Allows an Agent to draw a circle on a specified screen. Allows an Agent to draw a circle on a specified screen.
screenIndex | Index of the screen to draw on |
centrePosition | Centre of the circle |
radius | Radius of the circle |
red | Amount of red to draw |
green | Amount of green to draw |
blue | Amount of blue to draw |
thickness | Thickness of the border |
void drawCircle | ( | int | screenIndex, |
Vec2 | centrePosition, | ||
int | radius, | ||
RGBA | colourData, | ||
int | thickness | ||
) |
Allows an Agent to draw a circle on a specified screen. Allows an Agent to draw a circle on a specified screen.
screenIndex | Index of the screen to draw on |
centrePosition | Centre of the circle |
radius | Radius of the circle |
colourData | Colour data to draw |
thickness | Thickness of the border |
void drawLine | ( | int | screenIndex, |
Vec2 | startPosition, | ||
Vec2 | endPosition, | ||
int | red, | ||
int | green, | ||
int | blue | ||
) |
Allows an Agent to draw a line between two points on a specified screen. Allows an Agent to draw a line between two points on a specified screen.
screenIndex | Index of the screen to draw on |
startPosition | Starting position |
endPosition | End Position |
red | Amount of red to draw |
green | Amount of green to draw |
blue | Amount of blue to draw |
Allows an Agent to draw a line between two points on a specified screen. Allows an Agent to draw a line between two points on a specified screen.
screenIndex | Index of the screen to draw on |
startPosition | Starting position |
endPosition | End Position |
colourData | Colour data to draw |
void drawRect | ( | int | screenIndex, |
Vec2 | bottomLeft, | ||
Vec2 | topRight, | ||
int | red, | ||
int | green, | ||
int | blue, | ||
int | thickness | ||
) |
Allows an Agent to draw a rectangle on a specified screen. Allows an Agent to draw a rectangle on a specified screen.
screenIndex | Index of the screen to draw on |
bottomLeft | Bottom left of the rectangle |
topRight | Top right of the rectangle |
red | Amount of red to draw |
green | Amount of green to draw |
blue | Amount of blue to draw |
thickness | Thickness of the border |
Allows an Agent to draw a rectangle on a specified screen. Allows an Agent to draw a rectangle on a specified screen.
screenIndex | Index of the screen to draw on |
bottomLeft | Bottom left of the rectangle |
topRight | Top right of the rectangle |
colourData | Colour data to draw |
thickness | Thickness of the border |
void drawRelative | ( | int | screenIndex, |
Vec2 | relativePos, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | ID | ||
) |
Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the currently active Agent.
screenIndex | Index of the screen to draw on |
relativePos | The relative position to draw |
r | Red component |
g | Green component |
b | Blue component |
ID | ID for the specified Agent |
Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the currently active Agent.
screenIndex | Index of the screen to draw on |
relativePos | The relative position to draw |
colourData | Colour data to draw |
ID | ID for the specified Agent |
void drawRelativeID | ( | int | screenIndex, |
Vec2 | relativePos, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | ID | ||
) |
Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the Agent whose ID is provided.
screenIndex | Index of the screen to draw on |
relativePos | The relative position to draw |
r | Red component |
g | Green component |
b | Blue component |
ID | ID for the specified Agent |
Allows the drawing of colour data on a screen canvas (whose ID must be provided). Allows the drawing of colour data on a screen canvas (whose ID must be provided) in coordinates relative to the Agent whose ID is provided.
screenIndex | Index of the screen to draw on |
relativePos | The relative position to draw |
colourData | Colour data to draw |
ID | ID for the specified Agent |
int getB | ( | int | canvasIndex | ) |
Returns the blue component at an Agents current position. Returns the blue component at an Agents current position.
canvasIndex | Index of the screen |
int getBID | ( | int | canvasIndex, |
int | agentID | ||
) |
Returns the blue component at a specified Agents position. Returns the blue component at a specified Agents position.
canvasIndex | Index of the screen |
agentID | ID for the specified Agent |
int getBlueFromPoint | ( | int | screenIndex, |
Vec2 | point | ||
) |
Allows an Agent to extract the blue component of a point on a given screen canvas. Allows an Agent to extract the blue component of a point on a given screen canvas.
screenIndex | Index of the screen |
point | The point in question |
int getChild | ( | int | childIndex | ) |
Allows you to obtain the unique ID of a child Agent. Allows you to obtain the unique ID of a child Agent through a relative index. For example, you can obtain the second child through getChild(1)
childIndex | The index of the child |
int getChildID | ( | int | childID, |
int | parentID | ||
) |
Allows you to obtain the child of another Agent. Allows you to obtain a child from any Agent if its ID is known.
childID | The child ID relative to the parent. |
parentID | The ID of the parent. |
float getDT | ( | ) |
A utility and timing function that provides the delta between the current frame and the previous (i.e time elapsed). Delta between now and previous frame.
int getG | ( | int | screenIndex | ) |
Returns the green component at an Agents current position. Returns the green component at an Agents current position.
screenIndex | Index of the screen |
int getGID | ( | int | canvasIndex, |
int | agentID | ||
) |
Returns the green component at a specified Agents position. Returns the green component at a specified Agents position.
canvasIndex | Index of the screen |
agentID | ID for the specified Agent |
int getGreenFromPoint | ( | int | screenIndex, |
Vec2 | point | ||
) |
Allows an Agent to extract the green component of a point on a given screen canvas. Allows an Agent to extract the green component of a point on a given screen canvas.
screenIndex | Index of the screen |
point | The point in question |
int getID | ( | ) |
A crucial function allowing an Agent to obtain its own ID. Provides the unique identifier for the currently active Agent.
float getLifetime | ( | ) |
Allows an Agent to obtain how long it has been alive in seconds. Allows an Agent to obtain how long it has been alive in seconds.
float getLifetimeID | ( | int | ID | ) |
Allows an Agent to obtain how long another Agent has been alive in seconds. Allows an Agent to obtain how long another Agent has been alive in seconds.
ID | ID of the Agent |
int getMeanCol | ( | ) |
Allows the extraction of the mean/average of all three colour components at the position of the current Agent. Allows the extraction of the mean/average of all three colour components at the position of the current Agent.
int getMeanColID | ( | int | agentID | ) |
Allows the extraction of the mean/average of all three colour components at the position of a specified Agent. Allows the extraction of the mean/average of all three colour components at the position of a specified Agent.
agentID | ID of the specified Agent |
float getMeanFromPoint | ( | int | screenIndex, |
Vec2 | point | ||
) |
Allows the extraction of the mean/average of all three colour components at a given point. Allows the extraction of the mean/average of all three colour components at a given point.
screenIndex | Index of the screen |
point | The point in question |
table getNearby | ( | int | radius | ) |
Allows an Agent to obtain the ID's of all of the Agents within a surrounding radius. Allows an Agent to obtain the ID's of all of the Agents within a surrounding radius.
radius | Radius of the area to search |
table getNearby | ( | int | radius, |
Vec2 | position | ||
) |
Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified point. Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified point.
radius | Radius of the area to search |
position | Centre position of the area to search |
table getNearbyID | ( | int | radius, |
int | agentID | ||
) |
Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified Agent. Allows an Agent to obtain the ID's of all of the Agents within the surrounding radius of a specified Agent.
radius | Radius of the area to search |
agentID | ID for the specified Agent |
int getNearest | ( | Vec2 | point | ) |
Allows an Agent to obtain the ID of another Agent, closest to the provided position. Allows an Agent to obtain the ID of another Agent, closest to the provided position.
point | The point you wish to test against. |
int getNearest | ( | ) |
Allows an Agent to obtain the ID of another Agent, closest to the provided position. Allows an Agent to obtain the ID of the closest other Agent.
int getNearestID | ( | int | ID | ) |
Allows you to obtain the closest Agent to a specified Agent. Allows you to obtain the closest Agent to a specified Agent.
ID | ID for the specified Agent |
Vec2 getP | ( | string | propertyName | ) |
Allows an Agent to obtain the value of a property. Allows an Agent to obtain the value of a property, which can be a bool, int, float, string or Vec2.
propertyName | The name of the properties whose value you want to obtain |
int getParent | ( | ) |
Allows an Agent to obtain the ID of its parent. Allows an Agent to obtain the ID of its parent.
int getParentID | ( | int | childID | ) |
Allows an Agent to obtain the ID of a parent of another if its ID is known. Allows an Agent to obtain the ID of a parent of another if its ID is known.
childID | The ID of the child whose parent you wish to obtain. |
Vec2 getPID | ( | string | propertyName, |
int | ID | ||
) |
Allows an Agent to obtain the value of a property which belongs to another Agent. Allows an Agent to obtain the value of a property, belonging to another Agent. This value can be a bool, int, float, string or Vec2.
propertyName | The name of the properties whose value you want to obtain |
ID | ID for the specified Agent |
Vec2 getPosition | ( | ) |
Allows an Agent to quickly obtain its position. Allows an Agent to quickly obtain its position.
Vec2 getPositionID | ( | int | ID | ) |
Allows Agents to quickly obtain the position of any given Agent. Allows Agents to quickly obtain the position of any given Agent.
ID | The ID of the Agent in question |
int getR | ( | int | screenIndex | ) |
Returns the red component at an Agents current position. Returns the red component at an Agents current position.
screenIndex | Index of the screen |
int getRedFromPoint | ( | int | screenIndex, |
Vec2 | point | ||
) |
Allows an Agent to extract the red component of a point on a given screen canvas. Allows an Agent to extract the red component of a point on a given screen canvas.
screenIndex | Index of the screen |
point | The point in question |
RGBA getRGBA | ( | int | screenIndex | ) |
Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at it's position. Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at it's position.
screenIndex | Index of the screen |
Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at a position. Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at a position.
position | position of the data to extract |
screenIndex | Index of the screen |
RGBA getRGBAID | ( | int | screenIndex, |
int | agentID | ||
) |
Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at the position of another Agent. Allows an Agent to obtain an instance of an RGBA class containing the data from a specified image screen at the position of another Agent.
screenIndex | Index of the screen |
agentID | ID for the specified Agent |
int getRID | ( | int | screenIndex, |
int | ID | ||
) |
Returns the red component at a specified Agents position. Returns the red component at a specified Agents position.
screenIndex | Index of the screen |
ID | ID for the specified Agent |
int getTotalCol | ( | int | screenIndex | ) |
Allows the extraction of the total/sum of all three colour components at the Agents position. Allows the extraction of the total/sum of all three colour components at the Agents position.
screenIndex | Index of the screen |
int getTotalFromPoint | ( | int | screenIndex, |
Vec2 | point | ||
) |
Allows the extraction of the total/sum of all three colour components at a given point. Allows the extraction of the total/sum of all three colour components at a given point.
screenIndex | Index of the screen |
point | The point in question |
int getTotalID | ( | int | screenIndex, |
int | agentID | ||
) |
Allows the extraction of the total/sum of all three colour components at a specified Agents position. Allows the extraction of the total/sum of all three colour components at a specified Agents position.
screenIndex | Index of the screen |
agentID | ID for the specified Agent |
string getType | ( | ) |
Allows an Agent to obtain its own type. Allows an Agent to obtain its own type.
string getTypeID | ( | ) |
Allows an Agent to obtain the type of another Agent. Allows an Agent to obtain the type of another Agent.
Vec2 getWorldSize | ( | ) |
Allows an Agent to obtain the size of the current world. Allows an Agent to obtain the size of the current world.
bool hasChildren | ( | ) |
Returns whether the current Agent has any children. Returns whether the current Agent has any children.
bool hasChildrenID | ( | int | ID | ) |
Indicates whether an Agent, specified by an ID has any children. Indicates whether an Agent, specified by an ID has any children.
ID | ID of the Agent |
bool hasP | ( | string | propertyName | ) |
Allows an Agent to check whether it has a property with a specified name. Allows an Agent to check whether it has a property with a specified name.
propertyName | Name of the property to check |
bool hasPID | ( | string | propertyName | ) |
Allows an Agent to check whether another Agent contains a property with a specified name. Allows an Agent to check whether another Agent contains a property with a specified name.
propertyName | Name of the property to check |
void initai | ( | ) |
This MUST be called at the start of each Agent script. This initializes the parent script so that it is interpreted as an Agent by the system.
void initP | ( | table | propertyTable | ) |
Initializes the Agent with a suite of provided properties. Allows a function to be intialized as an Agent with a set of properties that are provided in a table of key value pairs {key=value}.
propertyTable | A table of property key value pairs |
void initPID | ( | table | propertyTable, |
int | ID | ||
) |
Allows an Agent to initialize another Agent with a suite of properties. Allows an Agent to initialize another Agent with a suite of properties that are stored in a table of key value pairs {key=value}.
propertyTable | A table of property key value pairs |
ID | ID for the specified Agent |
void killChildren | ( | ) |
Kills all of the current Agent's children. Kills all of the current Agent's children.
void killChildrenID | ( | int | agentID | ) |
Kills all of the specified Agents children. Kills all of the specified Agents children.
agentID | ID for the specified Agent |
void killID | ( | int | agentID | ) |
Allows an Agent to kill another Agent if its ID is known. Allows an Agent to kill another Agent if its ID is known.
agentID | The ID of the Agent you wish to kill. |
void move | ( | int | x, |
int | y | ||
) |
Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount.
x | Amount to move in the x plane |
y | Amount to move in the y plane |
void move | ( | Vec2 | delta | ) |
Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount.
delta | Delta to move by |
void moveID | ( | int | x, |
int | y, | ||
int | ID | ||
) |
Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount.
x | Amount to move in the x plane |
y | Amount to move in the y plane |
ID | The ID of the Agent |
void moveID | ( | Vec2 | delta, |
int | ID | ||
) |
Allows an Agent to move by a specified amount. Allows an Agent to move by a specified amount.
delta | Delta to move the specified Agent by |
ID | The ID of the Agent |
void movePath | ( | int | pathIndex, |
int | xDelta, | ||
int | yDelta | ||
) |
Allows an Agent to move a path by a delta. Allows an Agent to move a path by a delta.
pathIndex | Index of the path to move |
xDelta | Cartesian X delta |
yDelta | Cartesian Y delta |
void movePath | ( | int | pathIndex, |
Vec2 | delta | ||
) |
Allows an Agent to move a path by a delta. Allows an Agent to move a path by a delta.
pathIndex | Index of the path to move |
delta | Delta to move the path by |
void movePathPoint | ( | int | pathIndex, |
int | pointIndex, | ||
int | xPos, | ||
int | yPos | ||
) |
Allows an Agent to move a point in a path. Allows an Agent to move a point in a path.
pathIndex | Index of the path to use |
pointIndex | Index of the point to move int the path |
xPos | Cartesian X coordinate |
yPos | Cartesian Y coordinate |
void movePathPoint | ( | int | pathIndex, |
int | pointIndex, | ||
Vec2 | position | ||
) |
Allows an Agent to move a point in a path. Allows an Agent to move a point in a path.
pathIndex | Index of the path to use |
pointIndex | Index of the point to move int the path |
position | Position to move the point to |
int numberOfChildren | ( | ) |
Returns the number of children of the currently active Agent Returns the number of children of the currently active Agent.
int numberOfChildrenID | ( | int | ID | ) |
Provides access to the number of children of a specified Agent. Provides access to the number of children of a specified Agent.
ID | Parent ID |
void oscF | ( | string | ipAddress, |
string | portNumber, | ||
string | path, | ||
float | number | ||
) |
Allows the sending of float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)
ipAddress | IP address of the machine you wish to connect to |
portNumber | The port you wish to connect to |
path | The path you wish to send via |
number | number you wish to send |
void oscI | ( | string | ipAddress, |
string | portNumber, | ||
string | path, | ||
int | number | ||
) |
Allows the sending of float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of an integer via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)
ipAddress | IP address of the machine you wish to connect to |
portNumber | The port you wish to connect to |
path | The path you wish to send via |
number | number you wish to send |
void oscS | ( | string | ipAddress, |
string | portNumber, | ||
string | stringData | ||
) |
Allows the sending of a string via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a string via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)
ipAddress | IP address of the machine you wish to connect to |
portNumber | The port you wish to connect to |
stringData | string of data |
void oscSF | ( | string | ipAddress, |
string | portNumber, | ||
string | path, | ||
string | stringData, | ||
float | number | ||
) |
Allows the sending of a string and a float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a string and a float via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)
ipAddress | IP address of the machine you wish to connect to |
portNumber | The port you wish to connect to |
path | The path you wish to send via |
stringData | string containing the potential parameter name |
number | number you wish to send |
void oscSI | ( | string | ipAddress, |
string | portNumber, | ||
string | path, | ||
string | stringData, | ||
int | number | ||
) |
Allows the sending of a string and an integer via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a string and an integer via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)
ipAddress | IP address of the machine you wish to connect to |
portNumber | The port you wish to connect to |
path | The path you wish to send via |
stringData | string containing the potential parameter name |
number | number you wish to send |
void oscSS | ( | string | ipAddress, |
string | portNumber, | ||
string | path, | ||
string | stringData, | ||
string | secondStringData | ||
) |
Allows the sending of two string via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead) Allows the sending of a pair of strings via OSC to a specified IP address, port and path. (Deprecated please use 'send' instead)
ipAddress | IP address of the machine you wish to connect to |
portNumber | The port you wish to connect to |
path | The path you wish to send via |
stringData | string containing the potential parameter name |
secondStringData | string of data |
void removePath | ( | int | pathIndex | ) |
Allows an Agent to remove/delete a path with a given index. Allows an Agent to remove/delete a path with a given index.
pathIndex | Index of the path to remove |
void removePathPoint | ( | int | pathIndex, |
int | pointIndex | ||
) |
Allows an Agent to remove a point in a path. Allows an Agent to remove a point in a path.
pathIndex | Index of the path to use |
pointIndex | Index of the point to remove from the path |
void scFree | ( | int | nodeID | ) |
Kills the SuperCollider node with the ID provided. Kills the SuperCollider node with the ID provided.
nodeID | The SuperCollider NodeId you wish to kill. |
void scNew | ( | string | synthName, |
int | nodeID | ||
) |
Allows an Agent to spawn a Supercollider synth of the provided typename with the provided index. Allows an Agent to spawn a Supercollider synth of the provided typename with the provided index.
synthName | The name of the synth |
nodeID | The SuperCollider NodeId you wish to use. |
void scSet | ( | string | argName, |
float | value, | ||
int | nodeID | ||
) |
Allows an Agent to set the argument of a SuperCollider node. Allows an Agent to set the argument of a SuperCollider node.
argName | The name of the argument |
value | The argument value |
nodeID | The SuperCollider NodeId you wish to use. |
void send | ( | string | ipAddress, |
string | portNumber, | ||
string | path, | ||
data | |||
) |
Allows an Agent to send OSC data to a specified IPAddress, port and path. Allows an Agent to send OSC data to a specified IPAddress, port and path. A user can append as many pieces of data to send as they wish. This data can be numbers, strings and tables containing key value pairs of data. e.g send("127.0.0.1","8000","/example",100,"hello",3.14159,{more=info,data=200} )
ipAddress | IP address of the machine you wish to connect to |
portNumber | The port you wish to connect to |
path | The path you wish to send via |
data | Variadic data of type float, integer, string or a table containing key value pairs of data |
void setP | ( | string | propertyID, |
bool | value | ||
) |
Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
propertyID | The name of the new property |
value | The new value for the property |
void setP | ( | string | propertyID, |
int | value | ||
) |
Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
propertyID | The name of the new property |
value | The new value for the property |
void setP | ( | string | propertyID, |
float | value | ||
) |
Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
propertyID | The name of the new property |
value | The new value for the property |
void setP | ( | string | propertyID, |
string | value | ||
) |
Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
propertyID | The name of the new property |
value | The new value for the property |
void setP | ( | string | propertyID, |
Vec2 | value | ||
) |
Allows an Agent to set a property. If the property does not already exist, it will be created. Allows an Agent to set a property. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
propertyID | The name of the new property |
value | The new value for the property |
void setP | ( | table | propertyTable | ) |
Allows an Agent to set a table of properties. Allows an Agent to set a table of new properties. This table must contain key value pairs of data. If property in this table does not exist, a new property will be created for the data. If the current Agent is controlling a SuperCollider node, the system will attempt to set the arguments of the same names to the proposed values.
propertyTable | A table of key value properties |
void setPID | ( | string | propertyID, |
bool | value, | ||
int | ID | ||
) |
Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
propertyID | The name of the new property |
value | The new value for the property |
ID | ID for the specified Agent |
void setPID | ( | string | propertyID, |
int | value, | ||
int | ID | ||
) |
Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
propertyID | The name of the new property |
value | The new value for the property |
ID | ID for the specified Agent |
void setPID | ( | string | propertyID, |
float | value, | ||
int | ID | ||
) |
Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
propertyID | The name of the new property |
value | The new value for the property |
ID | ID for the specified Agent |
void setPID | ( | string | propertyID, |
string | value, | ||
int | ID | ||
) |
Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
propertyID | The name of the new property |
value | The new value for the property |
ID | ID for the specified Agent |
void setPID | ( | string | propertyID, |
Vec2 | value, | ||
int | ID | ||
) |
Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. Allows an Agent to set a property of a specified Agent. If the property does not already exist, it will be created. If the current Agent is controlling a SuperCollider node, the system will attempt to set an argument of the same name to the proposed valued.
propertyID | The name of the new property |
value | The new value for the property |
ID | ID for the specified Agent |
void setPID | ( | table | propertyTable, |
int | ID | ||
) |
Allows an Agent to set a table of properties in a specified Agent. Allows an Agent to set a table of new properties in a specified Agent. This table must contain key value pairs of data. If property in this table does not exist, a new property will be created for the data. If the current Agent is controlling a SuperCollider node, the system will attempt to set arguments of the same name to the proposed values.
propertyTable | A table of key value properties |
ID | ID for the specified Agent |
void setPosition | ( | int | xPos, |
int | yPos | ||
) |
Allows an Agent to set its position. (Deprecated) Allows an Agent to set its position. This is deprecated, uses should use setP, specifying the position property. i.e setP("pos" Vec2.new(100,100))
xPos | X cartesian coordinate |
yPos | Y cartesian coordinate |
void setPositionID | ( | int | xPos, |
int | yPos, | ||
int | ID | ||
) |
Allows an Agent to set the position of another Agent. Allows an Agent to set the position of another Agent. This is deprecated, uses should use setP, specifying the position property. i.e setPID("pos",Vec2.new(200,200),ID).
xPos | X cartesian coordinate |
yPos | Y cartesian coordinate |
ID | The ID of the Agent |
int spawn | ( | int | parentID, |
int | nodeType, | ||
string | agentFunctionName, | ||
int | xPos, | ||
int | yPos | ||
) |
Allows the spawning of an Agent (or another Node type) in world coordinates. he basic spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.
parentID | The ID of the new Agents parent |
nodeType | Should be set to 1 for Agents |
agentFunctionName | The name of the ai_function to use |
xPos | Cartesian X coordinate |
yPos | Cartesian Y coordinate |
int spawn | ( | int | parentID, |
int | nodeType, | ||
string | agentFunctionName, | ||
Vec2 | position | ||
) |
Allows the spawning of an Agent (or another Node type) in world coordinates. he basic spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.
parentID | The ID of the new Agents parent |
nodeType | Should be set to 1 for Agents |
agentFunctionName | The name of the ai_function to use |
position | A vector representing the position |
int spawnP | ( | table | propertyTable, |
int | parentID, | ||
int | nodeType, | ||
string | agentFunctionName, | ||
int | xPos, | ||
int | yPos | ||
) |
Allows the spawning of an Agent (or another Node type) with a table of properties for it to use. A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.
propertyTable | A table of property key value pairs |
parentID | The ID of the new Agents parent |
nodeType | Should be set to 1 for Agents |
agentFunctionName | The name of the ai_function to use |
xPos | Cartesian X coordinate |
yPos | Cartesian Y coordinate |
int spawnP | ( | table | propertyTable, |
int | parentID, | ||
int | nodeType, | ||
string | agentFunctionName, | ||
Vec2 | position | ||
) |
Allows the spawning of an Agent (or another Node type) with a table of properties for it to use. A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing world coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.
propertyTable | A table of property key value pairs |
parentID | The ID of the new Agents parent |
nodeType | Should be set to 1 for Agents |
agentFunctionName | The name of the ai_function to use |
position | Global position |
int spawnRelative | ( | int | parentID, |
int | nodeType, | ||
string | agentFunctionName, | ||
int | xPos, | ||
int | yPos | ||
) |
Allows the spawning of an Agent (or another Node type) using coordinates relative to the currently active Agent. A spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via coordinates that are relative to the currently active Agent's position (as cartesian components or as a Vec2).
parentID | The ID of the new Agents parent |
nodeType | Should be set to 1 for Agents |
agentFunctionName | The name of the ai_function to use |
xPos | Relative X position |
yPos | Relative Y position |
int spawnRelative | ( | int | parentID, |
int | nodeType, | ||
string | agentFunctionName, | ||
Vec2 | position | ||
) |
Allows the spawning of an Agent (or another Node type) using coordinates relative to the currently active Agent. A spawn function that allows the creation of new Agents. This is done so by specifying the parent ID, the name of the script function for the Agent to use and via coordinates that are relative to the currently active Agent's position (as cartesian components or as a Vec2).
parentID | The ID of the new Agents parent |
nodeType | Should be set to 1 for Agents |
agentFunctionName | The name of the ai_function to use |
position | Relative position |
int spawnRelativeP | ( | table | propertyTable, |
int | parentID, | ||
int | nodeType, | ||
string | agentFunctionName, | ||
int | xPos, | ||
int | yPos | ||
) |
Allows the spawning of an Agent (or another Node type) with a table of properties for it to use with coordinates relative to the currently active Agent A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing relative coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.
propertyTable | A table of key value properties |
parentID | The ID of the new Agents parent |
nodeType | Should be set to 1 for Agents |
agentFunctionName | The name of the ai_function to use |
xPos | Relative X coordinate |
yPos | Relative Y coordinate |
int spawnRelativeP | ( | table | propertyTable, |
int | parentID, | ||
int | nodeType, | ||
string | agentFunctionName, | ||
Vec2 | position | ||
) |
Allows the spawning of an Agent (or another Node type) with a table of properties for it to use with coordinates relative to the currently active Agent A spawn function that allows the creation of new Agents with a suite of properties stored within a table. This is done so by providing a table containing key value pairs {key = value}, the parent ID, the name of the script function for the Agent to use and via providing relative coordinates (as cartesian components or as a Vec2) for the Agent to spawn at.
propertyTable | A table of key value properties |
parentID | The ID of the new Agents parent |
nodeType | Should be set to 1 for Agents |
agentFunctionName | The name of the ai_function to use |
position | Relative position |