public class Fixture
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
Body |
m_body |
float |
m_density |
Filter |
m_filter |
float |
m_friction |
boolean |
m_isSensor |
Fixture |
m_next |
FixtureProxy[] |
m_proxies |
int |
m_proxyCount |
float |
m_restitution |
Shape |
m_shape |
java.lang.Object |
m_userData |
Constructor and Description |
---|
Fixture() |
Modifier and Type | Method and Description |
---|---|
void |
create(Body body,
FixtureDef def) |
void |
createProxies(BroadPhase broadPhase,
Transform xf) |
void |
destroy() |
void |
destroyProxies(BroadPhase broadPhase)
Internal method
|
void |
dump(int bodyIndex)
Dump this fixture to the log file.
|
AABB |
getAABB(int childIndex)
Get the fixture's AABB.
|
Body |
getBody()
Get the parent body of this fixture.
|
float |
getDensity() |
Filter |
getFilterData()
Get the contact filtering data.
|
float |
getFriction()
Get the coefficient of friction.
|
void |
getMassData(MassData massData)
Get the mass data for this fixture.
|
Fixture |
getNext()
Get the next fixture in the parent body's fixture list.
|
float |
getRestitution()
Get the coefficient of restitution.
|
Shape |
getShape()
Get the child shape.
|
ShapeType |
getType()
Get the type of the child shape.
|
java.lang.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(java.lang.Object data)
Set the user data.
|
protected void |
synchronize(BroadPhase broadPhase,
Transform transform1,
Transform transform2)
Internal method
|
boolean |
testPoint(Vec2 p)
Test a point for containment in this fixture.
|
public float m_density
public Fixture m_next
public Body m_body
public Shape m_shape
public float m_friction
public float m_restitution
public FixtureProxy[] m_proxies
public int m_proxyCount
public final Filter m_filter
public boolean m_isSensor
public java.lang.Object m_userData
public ShapeType getType()
public Shape getShape()
public boolean isSensor()
public void setSensor(boolean sensor)
sensor
- public void setFilterData(Filter filter)
filter
- public Filter getFilterData()
public void refilter()
public Body getBody()
public Fixture getNext()
public void setDensity(float density)
public float getDensity()
public java.lang.Object getUserData()
public void setUserData(java.lang.Object data)
data
- public boolean testPoint(Vec2 p)
p
- a point in world coordinates.public boolean raycast(RayCastOutput output, RayCastInput input, int childIndex)
output
- the ray-cast results.input
- the ray-cast input parameters.output
- input
- public void getMassData(MassData massData)
public float getFriction()
public void setFriction(float friction)
friction
- public float getRestitution()
public void setRestitution(float restitution)
restitution
- public AABB getAABB(int childIndex)
public void dump(int bodyIndex)
bodyIndex
- public void create(Body body, FixtureDef def)
public void destroy()
public void createProxies(BroadPhase broadPhase, Transform xf)
public void destroyProxies(BroadPhase broadPhase)
broadPhase
- protected void synchronize(BroadPhase broadPhase, Transform transform1, Transform transform2)
broadPhase
- xf1
- xf2
- Copyright © 2017. All Rights Reserved.