| Package | Box2D.Dynamics |
| Class | public class b2Fixture |
| Source | b2Fixture.as |
Warning: you cannot reuse fixtures.
| Method | Defined by | ||
|---|---|---|---|
|
Get the fixture's AABB.
| b2Fixture | ||
|
Get the parent body of this fixture.
| b2Fixture | ||
|
GetDensity():Number
Get the density of this fixture.
| b2Fixture | ||
|
Get the contact filtering data.
| b2Fixture | ||
|
GetFriction():Number
Get the coefficient of friction.
| b2Fixture | ||
|
Get the mass data for this fixture.
| b2Fixture | ||
|
Get the next fixture in the parent body's fixture list.
| b2Fixture | ||
|
GetRestitution():Number
Get the coefficient of restitution.
| b2Fixture | ||
|
Get the child shape.
| b2Fixture | ||
|
GetType():int
Get the type of the child shape.
| b2Fixture | ||
|
GetUserData():*
Get the user data that was assigned in the fixture definition.
| b2Fixture | ||
|
IsSensor():Boolean
Is this fixture a sensor (non-solid)?
| b2Fixture | ||
|
Perform a ray cast against this shape.
| b2Fixture | ||
|
SetDensity(density:Number):void
Set the density of this fixture.
| b2Fixture | ||
|
SetFilterData(filter:b2FilterData):void
Set the contact filtering data.
| b2Fixture | ||
|
SetFriction(friction:Number):void
Set the coefficient of friction.
| b2Fixture | ||
|
SetRestitution(restitution:Number):void
Get the coefficient of restitution.
| b2Fixture | ||
|
SetSensor(sensor:Boolean):void
Set if this fixture is a sensor.
| b2Fixture | ||
|
SetUserData(data:*):void
Set the user data.
| b2Fixture | ||
|
Test a point for containment in this fixture.
| b2Fixture | ||
| GetAABB | () | method |
public function GetAABB():b2AABBGet the fixture's AABB. This AABB may be enlarge and/or stale. If you need a more accurate AABB, compute it using the shape and the body transform.
Returnsb2AABB |
| GetBody | () | method |
public function GetBody():b2BodyGet the parent body of this fixture. This is NULL if the fixture is not attached.
Returnsb2Body —
the parent body.
|
| GetDensity | () | method |
public function GetDensity():NumberGet the density of this fixture.
ReturnsNumber — density
|
| GetFilterData | () | method |
| GetFriction | () | method |
public function GetFriction():NumberGet the coefficient of friction.
ReturnsNumber |
| GetMassData | () | method |
public function GetMassData(massData:b2MassData = null):b2MassDataGet the mass data for this fixture. The mass data is based on the density and the shape. The rotational inertia is about the shape's origin. This operation may be expensive
ParametersmassData:b2MassData (default = null) — - this is a reference to a valid massData, if it is null a new b2MassData is allocated and then returned
|
b2MassData |
| GetNext | () | method |
public function GetNext():b2FixtureGet the next fixture in the parent body's fixture list.
Returnsb2Fixture —
the next shape.
|
| GetRestitution | () | method |
public function GetRestitution():NumberGet the coefficient of restitution.
ReturnsNumber |
| GetShape | () | method |
public function GetShape():b2ShapeGet the child shape. You can modify the child shape, however you should not change the number of vertices because this will crash some collision caching mechanisms.
Returnsb2Shape |
| GetType | () | method |
public function GetType():intGet the type of the child shape. You can use this to down cast to the concrete shape.
Returnsint — the shape type.
|
| GetUserData | () | method |
public function GetUserData():*Get the user data that was assigned in the fixture definition. Use this to store your application specific data.
Returns* |
| IsSensor | () | method |
public function IsSensor():BooleanIs this fixture a sensor (non-solid)?
ReturnsBoolean — the true if the shape is a sensor.
|
| RayCast | () | method |
public function RayCast(output:b2RayCastOutput, input:b2RayCastInput):BooleanPerform a ray cast against this shape.
Parametersoutput:b2RayCastOutput — the ray-cast results.
|
|
input:b2RayCastInput — the ray-cast input parameters.
|
Boolean |
| SetDensity | () | method |
public function SetDensity(density:Number):voidSet the density of this fixture. This will _not_ automatically adjust the mass of the body. You must call b2Body::ResetMassData to update the body's mass.
Parametersdensity:Number |
| SetFilterData | () | method |
public function SetFilterData(filter:b2FilterData):voidSet the contact filtering data. This will not update contacts until the next time step when either parent body is active and awake.
Parametersfilter:b2FilterData |
| SetFriction | () | method |
public function SetFriction(friction:Number):voidSet the coefficient of friction.
Parametersfriction:Number |
| SetRestitution | () | method |
public function SetRestitution(restitution:Number):voidGet the coefficient of restitution.
Parametersrestitution:Number |
| SetSensor | () | method |
public function SetSensor(sensor:Boolean):voidSet if this fixture is a sensor.
Parameterssensor:Boolean |
| SetUserData | () | method |
public function SetUserData(data:*):voidSet the user data. Use this to store your application specific data.
Parametersdata:* |
| TestPoint | () | method |
public function TestPoint(p:b2Vec2):BooleanTest a point for containment in this fixture.
Parametersp:b2Vec2 — the shape world transform.
|
Boolean |