public class Fixture extends Object
Modifier and Type | Method and Description |
---|---|
Body |
getBody()
Get the parent body of this fixture.
|
float |
getDensity()
Get the density of this fixture.
|
Filter |
getFilterData() |
float |
getFriction()
Get the coefficient of friction.
|
float |
getRestitution()
Get the coefficient of restitution.
|
Shape |
getShape()
Returns the shape of this fixture
|
Shape.Type |
getType()
Get the type of the child shape.
|
Object |
getUserData() |
boolean |
isSensor()
Is this fixture a sensor (non-solid)?
|
void |
refilter()
Call this if you want to establish collision that was previously disabled by b2ContactFilter::ShouldCollide.
|
void |
setDensity(float density)
Set the density of this fixture.
|
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 userData)
Sets custom user data.
|
boolean |
testPoint(float x,
float y)
Test a point for containment in this fixture.
|
boolean |
testPoint(Vector2 p)
Test a point for containment in this fixture.
|
public Shape.Type getType()
public Shape getShape()
public void setSensor(boolean sensor)
public boolean isSensor()
public void setFilterData(Filter filter)
public Filter getFilterData()
public void refilter()
public Body getBody()
public boolean testPoint(Vector2 p)
p
- a point in world coordinates.public boolean testPoint(float x, float y)
x
- the x-coordinatey
- the y-coordinatepublic void setDensity(float density)
public float getDensity()
public float getFriction()
public void setFriction(float friction)
public float getRestitution()
public void setRestitution(float restitution)
public void setUserData(Object userData)
public Object getUserData()
Copyright © 2020. All rights reserved.