Scaleform Studio Lua API Reference: scaleform.physics.ChainShape object reference

scaleform.physics.ChainShape object reference

Description

Represents a chain shape consisting of multiple line segments.

Functions

Parameters

self :

scaleform.physics.ChainShape

The chain shape currently considered.

points :

scaleform.Point[]

Array of vertices in the chain shape, must have more than 1 point.

The [] notation indicates that this type is an array: a table in which the keys of the members are sequential integers, and the value of each element is an instance of the type shown.
Returns
This function does not return any values.
Parameters

self :

scaleform.physics.ChainShape

The chain shape currently in use.

points :

scaleform.Point[]

Array of vertices in the chain loop, must have more than 2 points.

The [] notation indicates that this type is an array: a table in which the keys of the members are sequential integers, and the value of each element is an instance of the type shown.
Returns
This function does not return any values.
Parameters

self :

scaleform.physics.ChainShape

The chain shape currently in use.

Returns

boolean

Returns true if there is a vertex connecting to the next shape and false otherwise.

Parameters

self :

scaleform.physics.ChainShape

The chain shape currently in use.

Returns

boolean

Returns true if there is a vertex connecting to the previous shape and false otherwise.

Parameters

self :

scaleform.physics.ChainShape

The chain shape currently in use.

Returns

scaleform.Point

The vertex of the next shape.

Parameters

self :

scaleform.physics.ChainShape

The chain shape currently in use.

Returns

integer

The number of vertices.

Parameters

self :

scaleform.physics.ChainShape

The chain shape currently in use.

Returns

scaleform.Point

The vertex of the previous shape.

Parameters

self :

scaleform.physics.ChainShape

The chain shape currently in use.

point :

scaleform.Point

The vertex for the next shape.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.ChainShape

The chain shape currently in use.

point :

scaleform.Point

The vertex of the previous shape.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.ChainShape

The chain shape currently in use.

index :

integer

The index at which a new vertex is inserted.

point :

scaleform.Point

The vertex to be added.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.ChainShape

The chain shape currently in use.

index :

integer

The index at which the vertex is returned.

Returns

scaleform.Point

The vertex.

 scaleform.physics.Shape
Represents shape used in fixtures.
 scaleform.physics.ChainShape.create_chain (self, points)
Creates a chain shape.
 self : scaleform.physics.ChainShape
The chain shape currently considered.
 points : scaleform.Point[]
Array of vertices in the chain shape, must have more than 1 point.
The [] notation indicates that this type is an array: a table in which the keys of the members are sequential integers, and the value of each element is an instance of the type shown.
 scaleform.physics.ChainShape
Represents a chain shape consisting of multiple line segments.
 scaleform.Point
Point should be in the form of a table {x=a, y=b}
{ PropertyType : string, x : number, y : number, }
 scaleform.physics.ChainShape.create_loop (self, points)
Creates a chain loop where the first and last vertices are connected.
 self : scaleform.physics.ChainShape
The chain shape currently in use.
 points : scaleform.Point[]
Array of vertices in the chain loop, must have more than 2 points.
The [] notation indicates that this type is an array: a table in which the keys of the members are sequential integers, and the value of each element is an instance of the type shown.
 scaleform.physics.ChainShape.has_next_vertex (self) : boolean
Checks if there is a vertex connecting to the next shape.
 self : scaleform.physics.ChainShape
The chain shape currently in use.
 booleantrue or false.  scaleform.physics.ChainShape.has_prev_vertex (self) : boolean
Checks if there is a vertex connecting to the previous shape.
 self : scaleform.physics.ChainShape
The chain shape currently in use.
 boolean  scaleform.physics.ChainShape.next_vertex (self) : scaleform.Point
Returns a vertex that establishes a connection to the next shape.
 self : scaleform.physics.ChainShape
The chain shape currently in use.
 scaleform.Point
The vertex of the next shape.
 scaleform.physics.ChainShape.num_vertices (self) : integer
Returns the number of vertices the shape has.
 self : scaleform.physics.ChainShape
The chain shape currently in use.
 integerA strictly integral numeric value, with no decimal component.  scaleform.physics.ChainShape.prev_vertex (self) : scaleform.Point
Returns a vertex that establishes a connection to the previous shape.
 self : scaleform.physics.ChainShape
The chain shape currently in use.
 scaleform.Point
The vertex of the previous shape.
 scaleform.physics.ChainShape.set_next_vertex (self, point)
Sets a vertex that establishes a connection to the next shape.
 self : scaleform.physics.ChainShape
The chain shape currently in use.
 point : scaleform.Point
The vertex for the next shape.
 scaleform.physics.ChainShape.set_prev_vertex (self, point)
Sets a vertex that establishes a connection to the previous shape.
 self : scaleform.physics.ChainShape
The chain shape currently in use.
 point : scaleform.Point
The vertex of the previous shape.
 scaleform.physics.ChainShape.set_vertex_by_index (self, index, point)
Sets a new vertex for the shape at the specified index.
 self : scaleform.physics.ChainShape
The chain shape currently in use.
 index : integer
The index at which a new vertex is inserted.
 point : scaleform.Point
The vertex to be added.
 scaleform.physics.ChainShape.vertex_by_index (self, index) : scaleform.Point
Returns the vertex of the shape at the specified index.
 self : scaleform.physics.ChainShape
The chain shape currently in use.
 index : integer
The index at which the vertex is returned.
 scaleform.Point
The vertex.
A string of characters.A numeric value.Indicates a table.
This documentation uses the term table to mean an anonymous, temporary Lua table that contains named data values. You typically use these tables to pass data or settings to a function, or to hold data returned by a function.
Indicates an object.
This documentation uses the term object to mean a named Lua table or userdata value that maintains a state. Some object types may have multiple instances existing at the same time, each with its own state; these objects typically have creation functions or accessors that you must call in order to get an instance. Some object types have only one instance, which you always access through the object's name.
Indicates a named variable within a namespace, object or table; or an element within an enumeration.Indicates a code sample.Indicates an enumeration.
This documentation uses the term enumeration to mean a named Lua table that contains only a set of constant values. These values typically identify a predefined set of options for some setting or behavior. You might pass an enumeration value to a function, or test the value returned by a function against the items in the enumeration to see which option is currently set.
Indicates a named variable within a namespace or object that has a pre-set constant value.Indicates a category: a semantic grouping of related API elements.Indicates a namespace.
This documentation uses the term namespace to mean a named Lua table that exists in only one single instance, intended as a container for an interface of related objects, functions and data variables.
Indicates an output value returned by a function.Indicates a named function within a namespace or object.Indicates an input parameter for a function.