bool valid
This value will be true if the object contains valid data.

uint id
The id of this fixture. This id is unique in the scene.

void select()
Selects the fixture.

void deselect()
Deselects the fixture.

bool isSelected()
Returns true if the fixture is currently selected.

string getName()
Returns the name of the fixture.

void setName(string)
Sets the name of the fixture.

void setFriction(float)
Sets the friction of the fixture.

void setRestitution(float)
Sets the restitution of the fixture.

void setDensity(float)
Sets the density of the fixture.

void setSensor(int)
Sets whether the fixture is a sensor fixture.

void setFilterCategoryBits(int)
Sets the category bits value for the collision filter of the fixture.

void setFilterMaskBits(int)
Sets the mask bits value for the collision filter of the fixture.

void setFilterGroupIndex(int)
Sets the group index value for the collision filter of the fixture.

void setMass(float)
Sets the mass of the fixture by adjusting the density. This function will fail for edge type fixtures (line/loop).

vertex getVertex(int)
Returns the vertex of the given index.

body getBody()
Returns the body this fixture is attached to.

void setVertex(int index, float x, float y)
Sets the position in local coordinates of the vertex of the given index.

void setVertex(int index, vec2 position)
Sets the position in local coordinates of the vertex of the given index.

vertex addVertex(int index, float x, float y)
Adds a vertex to the fixture. After addition, the new vertex will have the given index.

vertex addVertex(int index, vec2 position)
Adds a vertex to the fixture, at the given position in local coordinates. The new vertex will be inserted at the given index, with indices starting from zero. If the given index is zero or negative, the new vertex will be added to the beginning of the list. If the given index is larger than the number of vertices, the new vertex will be added to the end of the list. Existing vertex indices above the insert position will be moved up if necessary.

void deleteVertex(int)
Deletes the vertex of the given index.

int getNumVertices()
Returns the number of vertices this fixture has.

vertex[] getVertices()
Returns a list of all vertices belonging to this fixture.

void delete()
Deletes the fixture.

void reverseWinding()
Reverses the ordering of the vertices of this fixture. This can be useful for keeping polygons in a counter-clockwise winding, especially after flipping bodies/fixtures.

float getFriction()
Returns the friction of the fixture.

float getRestitution()
Returns the restitution of the fixture.

float getDensity()
Returns the density of the fixture.

bool isSensor()
Returns true if the fixture is a sensor fixture.

int getFilterCategoryBits()
Returns the collision filter category bits of the fixture.

int getFilterMaskBits()
Returns the collision filter mask bits of the fixture.

int getFilterGroupIndex()
Returns the collision filter group index of the fixture.

float getMass()
Returns the mass of the fixture (determined by the area and the density).

shape[] getShapes()
Returns a list of all shapes belonging to this fixture.

shape getShape(int)
Returns the shape of the given index.

string[] getCustomProperties()
Returns an array of the names of all custom properties for which a value actually exists.

bool hasCustomProperty(string propertyName)
Returns true if a value exists for the named property.

string getCustomPropertyType(string propertyName)
Returns the type of the named custom property. This will be one of int, float, string, vec2 or bool.

int getCustomInt(string propertyName, int defaultValue = 0)
Returns the value of the named custom property if it exists. If not, the optional default value will be returned. You can use hasCustomProperty to check if a value exists.

float getCustomFloat(string propertyName, float defaultValue = 0)
Returns the value of the named custom property if it exists. If not, the optional default value will be returned. You can use hasCustomProperty to check if a value exists.

string getCustomString(string propertyName, string defaultValue = "")
Returns the value of the named custom property if it exists. If not, the optional default value will be returned. You can use hasCustomProperty to check if a value exists.

vec2 getCustomVec2(string propertyName, vec2 defaultValue)
Returns the value of the named custom property if it exists. If not, the given default value will be returned. You can use hasCustomProperty to check if a value exists.

vec2 getCustomVec2(string propertyName)
Returns the value of the named custom property if it exists. If not, the vector 0,0 will be returned.

bool getCustomBool(string propertyName, bool defaultValue = false)
Returns the value of the named custom property if it exists. If not, the optional default value will be returned. You can use hasCustomProperty to check if a value exists.

vec2 getCustomColor(string propertyName, color defaultValue)
Returns the value of the named custom property if it exists. If not, the given default value will be returned. You can use hasCustomProperty to check if a value exists.

vec2 getCustomColor(string propertyName)
Returns the value of the named custom property if it exists. If not, the color 255,255,255,255 will be returned.

void setCustomInt(string propertyName, int)
Sets the value of the named custom property.

void setCustomFloat(string propertyName, float)
Sets the value of the named custom property.

void setCustomString(string propertyName, string)
Sets the value of the named custom property.

void setCustomVec2(string propertyName, vec2)
Sets the value of the named custom property.

void setCustomBool(string propertyName, bool)
Sets the value of the named custom property.

void setCustomColor(string propertyName, color)
Sets the value of the named custom property.

void clearCustomProperty(string propertyName)
Removes all values for the named custom property.