public class Fixture extends Object
| Modifier and Type | Field and Description |
|---|---|
FixtureProxy[] |
m_proxies |
| Modifier and Type | Method and Description |
|---|---|
float |
computeDistance(Vec2 p,
int childIndex,
Vec2 normalOut)
Compute the distance from this fixture.
|
boolean |
containsPoint(Vec2 p)
Test a point for containment in this fixture.
|
void |
createProxies(BroadPhase broadPhase,
Transform xf) |
AABB |
getAABB(int childIndex)
Get the fixture's AABB.
|
Body |
getBody()
Get the parent body of this fixture.
|
float |
getDensity() |
Filter |
getFilterData() |
float |
getFriction() |
void |
getMassData(MassData massData)
Get the mass data for this fixture.
|
FixtureProxy[] |
getProxies() |
int |
getProxyCount() |
float |
getRestitution() |
Shape |
getShape()
Get the child shape.
|
ShapeType |
getType()
Get the type of the child shape.
|
Object |
getUserData()
Get the user data that was assigned in the fixture definition.
|
boolean |
isSensor()
Is this fixture a sensor (non-solid)?
|
boolean |
raycast(RayCastOutput output,
RayCastInput input,
int childIndex)
Cast a ray against this shape.
|
void |
refilter()
Call this if you want to establish collision that was previously disabled by
ContactFilter::ShouldCollide.
|
void |
setDensity(float density) |
void |
setFilterData(Filter filter)
Set the contact filtering data.
|
void |
setFriction(float friction)
Set the coefficient of friction.
|
void |
setRestitution(float restitution)
Set the coefficient of restitution.
|
void |
setSensor(boolean sensor)
Set if this fixture is a sensor.
|
void |
setUserData(Object data)
Set the user data.
|
public FixtureProxy[] m_proxies
public ShapeType getType()
public Shape getShape()
public boolean isSensor()
public void setSensor(boolean sensor)
sensor - sensor flagpublic void setFilterData(Filter filter)
filter - filterpublic Filter getFilterData()
public int getProxyCount()
public FixtureProxy[] getProxies()
public void refilter()
public Body getBody()
public void setDensity(float density)
public float getDensity()
public Object getUserData()
public void setUserData(Object data)
data - user datapublic boolean containsPoint(Vec2 p)
p - a point in world coordinatespublic boolean raycast(RayCastOutput output, RayCastInput input, int childIndex)
output - the ray-cast resultsinput - the ray-cast input parameterspublic void getMassData(MassData massData)
public float getFriction()
public void setFriction(float friction)
friction - frictionpublic float getRestitution()
public void setRestitution(float restitution)
restitution - restitutionpublic AABB getAABB(int childIndex)
public float computeDistance(Vec2 p, int childIndex, Vec2 normalOut)
p - a point in world coordinates.public void createProxies(BroadPhase broadPhase, Transform xf)
Copyright © 2017. All rights reserved.