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

scaleform.physics.Fixture object reference

Description

An interface to attach shapes to the fixtures.

Functions

Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

index :

number

The child index of the fixture proxy.

Returns

scaleform.Rect

The AABB for the fixture currently in use.

This AABB may be stale. If you need a more accurate AABB, compute it using the shape and the body transform.

Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

Returns

scaleform.physics.Body

The physics body.

Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

input :

scaleform.physics.RayCastInput

The input line end point.

index :

integer

The index of the child the ray gets cast against.

Returns

boolean

Returns true if the ray cast hit something otherwise false.

scaleform.physics.RayCastOutput

the output line end point if the operation is successful.

Parameters

body :

scaleform.physics.Body

The physics body to which the fixture is attached.

shape :

scaleform.physics.ShapeDef

The shape definition data.

density :

number

Density of the body.

Returns

scaleform.physics.Fixture

The newly created Fixture.

Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

Returns

number

The density of the fixture.

Parameters

self :

scaleform.physics.Fixture

The fixture to destroy.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

Returns

scaleform.physics.CollisionFilter

The collision filter used for the fixture.

Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

Returns

number

The friction of the fixture.

Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

Returns

scaleform.physics.MassData

The mass data for the fixture.

The mass data is based on the density and the shape. The rotational inertia is about the shape's origin.

Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

Returns

scaleform.physics.MaterialDef

The material data definition.

Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

Returns

number

The restitution value.

Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

Returns

boolean

Whether fixture is a sensor or not.

Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

density :

number

The density of the fixture.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

filter :

scaleform.physics.CollisionFilter

The filter used to define the collision of the fixture.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

friction :

number

The friction of the fixture.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

material :

scaleform.physics.MaterialDef

The material data definition.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

restitution :

number

The restitution value.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

sensor :

boolean

A flag to determine whether fixture is a sensor or not.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

Returns

scaleform.ShapeComponent

The shape of the fixture.

Parameters

self :

scaleform.physics.Fixture

The fixture currently in use.

pt :

scaleform.Point

The point tested for.

Returns

boolean

Whether the point is in the fixture or not.

Parameters

self :

scaleform.physics.Fixture

The fixture currently considered.

Returns

scaleform.physics.ShapeTypes

The type of the shape.

 scaleform.physics.Body.fixture_by_index (self, index) : scaleform.physics.Fixture
Returns the fixture at the specified index.
 scaleform.physics.Fixture.create (body, shape, density) : scaleform.physics.Fixture
Creates a fixture and attaches it to the body.
 scaleform.physics.Fixture.aabb_by_index (self, index) : scaleform.Rect
Get the fixture's AABB.
 self : scaleform.physics.Fixture
The fixture currently in use.
 index : number
The child index of the fixture proxy.
 scaleform.Rect
The AABB for the fixture currently in use.
 scaleform.physics.Fixture
An interface to attach shapes to the fixtures.
A numeric value.  scaleform.Rect
A rectangle based upon two points.
{ x1 : number, x2 : number, y1 : number, y2 : number, }
 scaleform.physics.Fixture.body (self) : scaleform.physics.Body
Returns the body which owns this fixture.
 self : scaleform.physics.Fixture
The fixture currently in use.
 scaleform.physics.Body
The physics body.
 scaleform.physics.Body
Interface for physics properties of a vgx actor.
 scaleform.physics.Fixture.cast_ray (self, input, index) : boolean, scaleform.physics.RayCastOutput
Cast a ray against this shape of the fixture.
 self : scaleform.physics.Fixture
The fixture currently in use.
 input : scaleform.physics.RayCastInput
The input line end point.
 index : integer
The index of the child the ray gets cast against.
 boolean  scaleform.physics.RayCastOutput
the output line end point if the operation is successful.
 scaleform.physics.RayCastInput (init) : scaleform.physics.RayCastInput
Create an initialized ray cast input table.
A strictly integral numeric value, with no decimal component.true or false.  scaleform.physics.RayCastOutput (init) : scaleform.physics.RayCastOutput
Create an initialized ray cast output table.
 body : scaleform.physics.Body
The physics body to which the fixture is attached.
 shape : scaleform.physics.ShapeDef
The shape definition data.
 density : number
Density of the body.
 scaleform.physics.Fixture
The newly created Fixture.
 scaleform.physics.ShapeDef (init) : scaleform.physics.ShapeDef
Create an initialized shape definition table.
 scaleform.physics.Fixture.density (self) : number
Gets the density of the fixture.
 self : scaleform.physics.Fixture
The fixture currently in use.
 number  scaleform.physics.Fixture.destroy (self)
Destroys the fixture and detaches it from the body.
 self : scaleform.physics.Fixture
The fixture to destroy.
 scaleform.physics.Fixture.filter_data (self) : scaleform.physics.CollisionFilter
Gets the filter data used to filter collision between objects.
 self : scaleform.physics.Fixture
The fixture currently in use.
 scaleform.physics.CollisionFilter
The collision filter used for the fixture.
 scaleform.physics.CollisionFilter (init) : scaleform.physics.CollisionFilter
Create an initialized collision filter table.
 scaleform.physics.Fixture.friction (self) : number
Gets the friction of the fixture.
 self : scaleform.physics.Fixture
The fixture currently in use.
 number  scaleform.physics.Fixture.mass_data (self) : scaleform.physics.MassData
Gets the mass data for this fixture.
 self : scaleform.physics.Fixture
The fixture currently in use.
 scaleform.physics.MassData
The mass data for the fixture.
 scaleform.physics.MassData (init) : scaleform.physics.MassData
Create an initialized mass data table.
 scaleform.physics.Fixture.material (self) : scaleform.physics.MaterialDef
Gets the material data of the fixture.
 self : scaleform.physics.Fixture
The fixture currently in use.
 scaleform.physics.MaterialDef
The material data definition.
 scaleform.physics.MaterialDef (init) : scaleform.physics.MaterialDef
Create an initialized material definition table.
 scaleform.physics.Fixture.refilter (self)
Resets the filter used for the fixture.
 self : scaleform.physics.Fixture
The fixture currently in use.
 scaleform.physics.Fixture.restitution (self) : number
Gets the restitution of the fixture.
 self : scaleform.physics.Fixture
The fixture currently in use.
 number  scaleform.physics.Fixture.sensor (self) : boolean
Determines whether the fixture is a sensor (non-solid surface) or not).
 self : scaleform.physics.Fixture
The fixture currently in use.
 boolean  scaleform.physics.Fixture.set_density (self, density)
Sets the density of the fixture.
 self : scaleform.physics.Fixture
The fixture currently in use.
 density : number
The density of the fixture.
 scaleform.physics.Fixture.set_filter_data (self, filter)
Sets the filter data used to filter collision between objects.
 self : scaleform.physics.Fixture
The fixture currently in use.
 filter : scaleform.physics.CollisionFilter
The filter used to define the collision of the fixture.
 scaleform.physics.Fixture.set_friction (self, friction)
Sets the friction of the fixture.
 self : scaleform.physics.Fixture
The fixture currently in use.
 friction : number
The friction of the fixture.
 scaleform.physics.Fixture.set_material (self, material)
Sets the material data for the fixture.
 self : scaleform.physics.Fixture
The fixture currently in use.
 material : scaleform.physics.MaterialDef
The material data definition.
 scaleform.physics.Fixture.set_restitution (self, restitution)
Sets the restitution of the fixture.
 self : scaleform.physics.Fixture
The fixture currently in use.
 restitution : number
The restitution value.
 scaleform.physics.Fixture.set_sensor (self, sensor)
Defines if a fixture is a sensor (non-solid surface).
 self : scaleform.physics.Fixture
The fixture currently in use.
 sensor : boolean
A flag to determine whether fixture is a sensor or not.
 scaleform.physics.Fixture.shape (self) : scaleform.ShapeComponent
Returns the shape of the fixture.
 self : scaleform.physics.Fixture
The fixture currently in use.
 scaleform.ShapeComponent
The shape of the fixture.
 scaleform.ShapeComponent
An interface to shape component.
 scaleform.physics.Fixture.test_point (self, pt) : boolean
Test a point for containment in this fixture.
 self : scaleform.physics.Fixture
The fixture currently in use.
 pt : scaleform.Point
The point tested for.
 boolean  scaleform.Point
Point should be in the form of a table {x=a, y=b}
{ PropertyType : string, x : number, y : number, }
 scaleform.physics.Fixture.type (self) : scaleform.physics.ShapeTypes
Returns the type of the shape.
 self : scaleform.physics.Fixture
The fixture currently considered.
 scaleform.physics.ShapeTypes
The type of the shape.
 scaleform.physics.ShapeTypes
The different types of shapes.
 self : scaleform.physics.Body
The physics body currently in use.
 index : integer
The index at which the fixture is returned from 1 to fixture count.
 scaleform.physics.Fixture
The fixture attached to a body.
 init : scaleform.physics.RayCastInput?
An table arguments to initialize the returned physics.RayCastInput table with. [more...]
The ? notation indicates that this type is optional: there may be zero or one instances of it.
 scaleform.physics.RayCastInput
Returns a fully constructed ray cast input table.
 init : scaleform.physics.RayCastOutput?
An table arguments to initialize the returned physics.RayCastOutput table with. [more...]
The ? notation indicates that this type is optional: there may be zero or one instances of it.
 scaleform.physics.RayCastOutput
Returns a fully constructed ray cast output table.
 init : scaleform.physics.ShapeDef?
An table arguments to initialize the returned physics.ShapeDef table with. [more...]
The ? notation indicates that this type is optional: there may be zero or one instances of it.
 scaleform.physics.ShapeDef
Returns a fully constructed shape definition table.
 init : scaleform.physics.CollisionFilter?
An table arguments to initialize the returned physics.CollisionFilter table with. [more...]
The ? notation indicates that this type is optional: there may be zero or one instances of it.
 scaleform.physics.CollisionFilter
Returns a fully constructed collision filter table.
 init : scaleform.physics.MassData?
An table arguments to initialize the returned physics.MassData table with. [more...]
The ? notation indicates that this type is optional: there may be zero or one instances of it.
 scaleform.physics.MassData
Returns a fully constructed mass data table.
 init : scaleform.physics.MaterialDef?
An table arguments to initialize the returned physics.MaterialDef table with. [more...]
The ? notation indicates that this type is optional: there may be zero or one instances of it.
 scaleform.physics.MaterialDef
Returns a fully constructed material definition table.
A string of characters.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.